Sea 0.4.0

Class ChannelResponse.Read

  extended bygov.lbl.dsd.sea.nio.event.ChannelResponse
      extended bygov.lbl.dsd.sea.nio.event.ChannelResponse.Read
Enclosing class:

public static class ChannelResponse.Read
extends ChannelResponse

Contains a buffer with the non-blocking data read from the given channel (originally initiated by a prior ChannelRequest.Registerrequest containing SelectionKeyOP_READ ops); The data has buffer.remaining() bytes, and is contained between indexes 0 == buffer.position() and buffer.limit(), as usual with NIO; A buffer with !buffer.hasRemaining() indicates that end-of-stream has been reached for the given channel. Once your application has completely processed the contained buffer, you can for efficiency consider reusing it (e.g. via a buffer pool).

Nested Class Summary
Nested classes inherited from class gov.lbl.dsd.sea.nio.event.ChannelResponse
ChannelResponse.Accepted, ChannelResponse.Closed, ChannelResponse.Connected, ChannelResponse.Read, ChannelResponse.Registered, ChannelResponse.Write
Constructor Summary
ChannelResponse.Read(NetAgent agent, SelectionKey key, IOException exception, ByteBuffer buffer)
Method Summary
 ByteBuffer getBuffer()
 String toString()
Methods inherited from class gov.lbl.dsd.sea.nio.event.ChannelResponse
getAgent, getException, getKey
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public ChannelResponse.Read(NetAgent agent,
                            SelectionKey key,
                            IOException exception,
                            ByteBuffer buffer)
Method Detail


public ByteBuffer getBuffer()


public String toString()
toString in class ChannelResponse

Sea 0.4.0