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, AsyncWriteAsyncChannel, CounterAsyncChannel, DatagramSocketSyncChannel, FilterAsyncChannel, FilterAsyncChannelServer, FilterSyncChannel, FilterSyncChannelServer, NIOAsyncChannel, NIOAsyncChannelServer, NIOSyncChannel, NIOSyncChannelServer, OnePortAsyncChannelServer, PacketAggregatingAsyncChannel, PacketAggregatingSyncChannel, PushbackSyncChannel, SocketStreamChannel, SocketStreamChannelServer, SocketSyncChannel, SocketSyncChannelServer, SynchornizedAsyncChannel, SynchornizedSyncChannel, SynchToAsynchChannelAdapter, SyncToAsyncChannel, SyncToAsyncChannelServer, VMPipeAsyncChannelFactory.ClassloaderAsyncChannelAdapter, VMPipeAsyncChannelPipe.PipeChannel, VMPipeAsyncChannelServer, WriteBufferedAsyncChannel, WriteBufferedSyncChannel
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$
Method Summary |
void |
start()
Starts the channel. |
void |
stop(long timeout)
Stops the channel. |
NO_WAIT_TIMEOUT
static final long NO_WAIT_TIMEOUT
- See Also:
- Constant Field Values
WAIT_FOREVER_TIMEOUT
static final long WAIT_FOREVER_TIMEOUT
- See Also:
- Constant Field Values
start
void start()
throws IOException
- Starts the channel. Once started, the channel is in the running state.
- Throws:
IOException
stop
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 © -2009 The ActiveIO Project. All Rights Reserved.