org.activeio.filter
Class PushbackSyncChannel

java.lang.Object
  extended by org.activeio.FilterSyncChannel
      extended by org.activeio.filter.PushbackSyncChannel
All Implemented Interfaces:
Channel, Disposable, InputSyncChannel, OutputChannel, Service, SyncChannel

public class PushbackSyncChannel
extends FilterSyncChannel


Field Summary
 
Fields inherited from interface org.activeio.Service
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT
 
Fields inherited from interface org.activeio.Service
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT
 
Constructor Summary
PushbackSyncChannel(SyncChannel next)
           
PushbackSyncChannel(SyncChannel next, Packet putback)
           
 
Method Summary
 void putback(Packet packet)
           
 Packet read(long timeout)
          Used to synchronously receive a packet of information going 'up' the channel.
 
Methods inherited from class org.activeio.FilterSyncChannel
dispose, flush, getNext, narrow, start, stop, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PushbackSyncChannel

public PushbackSyncChannel(SyncChannel next)

PushbackSyncChannel

public PushbackSyncChannel(SyncChannel next,
                           Packet putback)
Method Detail

putback

public void putback(Packet packet)

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
Returns:
the packet received or null if the timeout occurred.
Throws:
IOException
See Also:
InputSyncChannel.read(long)


Copyright © -2009 The ActiveIO Project. All Rights Reserved.