org.activeio.filter
Class PacketAggregatingSyncChannel
java.lang.Object
org.activeio.FilterSyncChannel
org.activeio.filter.PacketAggregatingSyncChannel
- All Implemented Interfaces:
- Channel, Disposable, InputSyncChannel, OutputChannel, Service, SyncChannel
- public final class PacketAggregatingSyncChannel
- extends FilterSyncChannel
This PacketAggregatingSynchChannel 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 org.activeio.SynchChannel
adds a 4 byte header
to each packet that is sent down.
- Version:
- $Revision$
Method Summary |
Packet |
read(long timeout)
Used to synchronously receive a packet of information going 'up' the channel. |
void |
write(Packet packet)
Sends a packet down the channel towards the media. |
PacketAggregatingSyncChannel
public PacketAggregatingSyncChannel(SyncChannel next)
- Parameters:
next
-
read
public Packet read(long timeout)
throws IOException
- Description copied from interface:
InputSyncChannel
- Used to synchronously receive a packet of information going 'up' the channel.
This method blocks until a packet is received or the operation experiences timeout.
- Specified by:
read
in interface InputSyncChannel
- Overrides:
read
in class FilterSyncChannel
- Throws:
IOException
- See Also:
InputSyncChannel.read(long)
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 FilterSyncChannel
- Throws:
IOException
- See Also:
org.activeio.Channel#write(org.activeio.Packet)
Copyright © -2007 The ActiveIO Project. All Rights Reserved.