org.activeio
Interface Service

All Known Subinterfaces:
AsyncChannel, AsyncChannelServer, AsyncCommandChannel, AsynchChannel, Channel, ChannelServer, InputAsyncChannel, InputStreamChannel, InputSyncChannel, OutputChannel, OutputStreamChannel, RequestChannel, StreamChannel, StreamChannelServer, SyncChannel, SyncChannelServer
All Known Implementing Classes:
AsyncChannelToAsyncCommandChannel, AsyncChannelToClientRequestChannel, AsyncChannelToConcurrentRequestChannel, AsyncChannelToServerRequestChannel, AsyncToSyncChannel, AsyncToSyncChannelServer, DatagramSocketSyncChannel, FilterAsyncChannel, FilterAsyncChannelServer, FilterSyncChannel, FilterSyncChannelServer, NIOAsyncChannel, NIOSyncChannel, SocketStreamChannel, SocketStreamChannelServer, SocketSyncChannel, SocketSyncChannelServer, SyncToAsyncChannel, SyncToAsyncChannelServer, VMPipeAsyncChannelFactory.ClassloaderAsyncChannelAdapter, VMPipeAsyncChannelPipe.PipeChannel, VMPipeAsyncChannelServer

public interface Service

The Service interface is used control the running state of a channel. Some channels may use background threads to provide SEDA style processing. By implenting the Service interface, a protcol can allow a container to control those threads.

Version:
$Revision$

Field Summary
static long NO_WAIT_TIMEOUT
           
static long WAIT_FOREVER_TIMEOUT
           
 
Method Summary
 void start()
          Starts the channel.
 void stop(long timeout)
          Stops the channel.
 

Field Detail

NO_WAIT_TIMEOUT

public static final long NO_WAIT_TIMEOUT
See Also:
Constant Field Values

WAIT_FOREVER_TIMEOUT

public static final long WAIT_FOREVER_TIMEOUT
See Also:
Constant Field Values
Method Detail

start

public void start()
           throws IOException
Starts the channel. Once started, the channel is in the running state.

Throws:
IOException

stop

public void stop(long timeout)
          throws IOException
Stops the channel. Once stopped, the channel is in the stopped state.

Parameters:
timeout - The amount of time the channel is allowed to take to gracefully stop. If the timeout is exceeded, the channel should do a forcefull stop.
Throws:
IOException


Copyright © -2007 The ActiveIO Project. All Rights Reserved.