Sea 0.4.0

gov.lbl.dsd.sea.nio.event
Class ChannelResponse.Write

java.lang.Object
  extended bygov.lbl.dsd.sea.nio.event.ChannelResponse
      extended bygov.lbl.dsd.sea.nio.event.ChannelResponse.Write
Enclosing class:
ChannelResponse

public static class ChannelResponse.Write
extends ChannelResponse

Contains a buffer with the data fully written to the given channel (originally initiated by a prior ChannelRequest.WriteData request). Once the buffer has been fully written you can for efficiency consider reusing it (e.g. via a buffer pool). The contained buffer is IDENTICAL to the buffer originally handed to the agent via a ChannelRequest.WriteData. Caution: DO NOT modify the buffer in any way until it has been fully written! Failure to observe this rule can cause MAJOR data corruption.


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.Write(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

ChannelResponse.Write

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

getBuffer

public ByteBuffer getBuffer()

toString

public String toString()
Overrides:
toString in class ChannelResponse

Sea 0.4.0