org.activeio.filter
Class PacketAggregatingSynchChannel
java.lang.Object
org.activeio.FilterSynchChannel
org.activeio.filter.PacketAggregatingSynchChannel
- All Implemented Interfaces:
- Channel, Disposable, InputSynchChannel, OutputChannel, Service, SynchChannel
- public final class PacketAggregatingSynchChannel
- extends FilterSynchChannel
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 SynchChannel
adds a 4 byte header
to each packet that is sent down.
- Version:
- $Revision$
Method Summary |
Packet |
read(long timeout)
Used to synchonously receive a packet of information going 'up' the channel. |
void |
write(Packet packet)
Sends a packet down the channel towards the media. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PacketAggregatingSynchChannel
public PacketAggregatingSynchChannel(SynchChannel next)
- Parameters:
next
-
read
public Packet read(long timeout)
throws java.io.IOException
- Description copied from interface:
InputSynchChannel
- Used to synchonously 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 InputSynchChannel
- Overrides:
read
in class FilterSynchChannel
- Throws:
java.io.IOException
- See Also:
InputSynchChannel.read(long)
write
public void write(Packet packet)
throws java.io.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 FilterSynchChannel
- Throws:
java.io.IOException
- See Also:
org.activeio.Channel#write(org.activeio.channel.Packet)
Copyright © -2005 The ActiveIO Project. All Rights Reserved.