org.activeio
Interface Service
- All Known Subinterfaces:
- AsynchChannel, AsynchChannelServer, Channel, ChannelServer, InputAsynchChannel, InputSynchChannel, OutputChannel, RequestChannel, SynchChannel, SynchChannelServer
- All Known Implementing Classes:
- AIOAsynchChannel, AIOSynchChannelServer, AsynchChannelToClientRequestChannel, AsynchChannelToConcurrentRequestChannel, AsynchChannelToServerRequestChannel, AsynchToSynchChannelAdapter, AsynchToSynchChannelServerAdapter, DatagramSocketSynchChannel, FilterAsynchChannel, FilterAsynchChannelServer, FilterSynchChannel, FilterSynchChannelServer, NIOAsynchChannel, NIOSynchChannel, SocketSynchChannel, SocketSynchChannelServer, SynchToAsynchChannelAdapter, SynchToAsynchChannelServerAdapter, VMPipeAsynchChannelFactory.ClassloaderAsynchChannelAdapter, VMPipeAsynchChannelPipe.PipeChannel, VMPipeAsynchChannelServer
- 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
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
start
public void start()
throws java.io.IOException
- Starts the channel. Once started, the channel is in the running state.
- Throws:
java.io.IOException
stop
public void stop(long timeout)
throws java.io.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:
java.io.IOException
Copyright © -2005 The ActiveIO Project. All Rights Reserved.