org.activeio.adapter
Class AsynchWriteAsynchChannelAdapter

java.lang.Object
  extended byorg.activeio.FilterAsynchChannel
      extended byorg.activeio.adapter.AsynchWriteAsynchChannelAdapter
All Implemented Interfaces:
AsynchChannel, AsynchChannelListener, Channel, Disposable, InputAsynchChannel, OutputChannel, Service

public class AsynchWriteAsynchChannelAdapter
extends FilterAsynchChannel


Nested Class Summary
static class AsynchWriteAsynchChannelAdapter.ObjectDispatcher
           
static class AsynchWriteAsynchChannelAdapter.ObjectDispatcherX
           
 
Field Summary
 
Fields inherited from class org.activeio.FilterAsynchChannel
channelListener, next
 
Fields inherited from interface org.activeio.Service
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT
 
Constructor Summary
AsynchWriteAsynchChannelAdapter(AsynchChannel next)
           
AsynchWriteAsynchChannelAdapter(AsynchChannel next, int queueSize)
           
 
Method Summary
 void flush()
          Some channels may buffer data which may be sent down if flush() is called.
 void onObject(java.lang.Object o)
           
 void stop(long timeout)
          Stops the channel.
 void write(Packet packet)
          Sends a packet down the channel towards the media.
 
Methods inherited from class org.activeio.FilterAsynchChannel
dispose, getAsynchChannelListener, getNext, narrow, onPacket, onPacketError, setAsynchChannelListener, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsynchWriteAsynchChannelAdapter

public AsynchWriteAsynchChannelAdapter(AsynchChannel next)

AsynchWriteAsynchChannelAdapter

public AsynchWriteAsynchChannelAdapter(AsynchChannel next,
                                       int queueSize)
Method Detail

onObject

public void onObject(java.lang.Object o)

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 FilterAsynchChannel
Throws:
java.io.IOException
See Also:
org.activeio.Channel#write(org.activeio.channel.Packet)

flush

public void flush()
           throws java.io.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 FilterAsynchChannel
Throws:
java.io.IOException
See Also:
org.activeio.Channel#flush()

stop

public void stop(long timeout)
          throws java.io.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 FilterAsynchChannel
Throws:
java.io.IOException
See Also:
Service.stop(long)


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