org.activeio.filter
Class AsyncWriteAsyncChannel
java.lang.Object
org.activeio.FilterAsyncChannel
org.activeio.filter.AsyncWriteAsyncChannel
- All Implemented Interfaces:
- AsyncChannel, AsyncChannelListener, Channel, Disposable, InputAsyncChannel, OutputChannel, Service
public class AsyncWriteAsyncChannel
- extends FilterAsyncChannel
Method Summary |
void |
flush()
Some channels may buffer data which may be sent down if flush() is called. |
void |
onObject(Object o)
|
void |
stop(long timeout)
Stops the channel. |
void |
write(Packet packet)
Sends a packet down the channel towards the media. |
AsyncWriteAsyncChannel
public AsyncWriteAsyncChannel(AsyncChannel next)
AsyncWriteAsyncChannel
public AsyncWriteAsyncChannel(AsyncChannel next,
int queueSize)
onObject
public void onObject(Object o)
write
public void write(Packet packet)
throws IOException
- Description copied from interface:
OutputChannel
- Sends a packet down the channel towards the media.
- Specified by:
write
in interface OutputChannel
- Overrides:
write
in class FilterAsyncChannel
- Throws:
IOException
flush
public void flush()
throws IOException
- Description copied from interface:
OutputChannel
- Some channels may buffer data which may be sent down if flush() is called.
- Specified by:
flush
in interface OutputChannel
- Overrides:
flush
in class FilterAsyncChannel
- Throws:
IOException
stop
public void stop(long timeout)
throws IOException
- Description copied from interface:
Service
- Stops the channel. Once stopped, the channel is in the stopped state.
- Specified by:
stop
in interface Service
- Overrides:
stop
in class FilterAsyncChannel
- 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
- See Also:
Service.stop(long)
Copyright © -2009 The ActiveIO Project. All Rights Reserved.