org.activeio.filter
Class PacketAggregatingAsyncChannel
java.lang.Object
org.activeio.FilterAsyncChannel
org.activeio.filter.PacketAggregatingAsyncChannel
- All Implemented Interfaces:
- AsyncChannel, AsyncChannelListener, Channel, Disposable, InputAsyncChannel, OutputChannel, Service
public final class PacketAggregatingAsyncChannel
- extends FilterAsyncChannel
This PacketAggregatingAsyncChannel can be used when the client is sending a
'record' style packet down the channel stack and needs receiving end to
receive the same 'record' packets.
This is very usefull since in general, a channel does not garantee that a
Packet that is sent down will not be fragmented or combined with other Packet
objects.
This AsyncChannel
adds a 4 byte header
to each packet that is sent down.
- Version:
- $Revision$
Method Summary |
void |
onPacket(Packet packet)
A AsyncChannel will call this method to deliver an 'up' packet to a consumer. |
void |
write(Packet packet)
Sends a packet down the channel towards the media. |
PacketAggregatingAsyncChannel
public PacketAggregatingAsyncChannel(AsyncChannel next)
onPacket
public void onPacket(Packet packet)
- Description copied from interface:
AsyncChannelListener
- A
AsyncChannel
will call this method to deliver an 'up' packet to a consumer.
- Specified by:
onPacket
in interface AsyncChannelListener
- Overrides:
onPacket
in class FilterAsyncChannel
- See Also:
AsyncChannelListener.onPacket(org.activeio.Packet)
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
Copyright © -2009 The ActiveIO Project. All Rights Reserved.