Sea 0.4.0

Class ChannelResponse

  extended bygov.lbl.dsd.sea.nio.event.ChannelResponse
Direct Known Subclasses:
ChannelResponse.Accepted, ChannelResponse.Closed, ChannelResponse.Connected, ChannelResponse.Read, ChannelResponse.Registered, ChannelResponse.Write

public abstract class ChannelResponse
extends Object

Response from an agent to a prior ChannelRequest.Registeror ChannelRequest.Close or ChannelRequest.WriteDatarequest; Contains the agent this response originates from, as well as the selection key of the channel the request/response are associated with (retrievable via, as well as an optional exception that may have been thrown by the agent in attempting to handle the associated prior request.

$Revision: 1.13 $, $Date: 2004/07/28 19:49:20 $

Nested Class Summary
static class ChannelResponse.Accepted
          Indicates that an agent has accepted a new channel from a network client (originally initiated by a ChannelRequest.Registerrequest containing SelectionKey OP_ACCEPT ops).
static class ChannelResponse.Closed
          Indicates that an agent has closed a channel (originally initiated by a ChannelRequest.Closerequest).
static class ChannelResponse.Connected
          Indicates that an agent has connected to a network server (originally initiated by a ChannelRequest.Registerrequest containing SelectionKey OP_CONNECT ops).
static class ChannelResponse.Read
          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.
static class ChannelResponse.Registered
          Indicates response is to a prior ChannelRequest.Registerrequest; The interest ops supplied to the original request can be retrieved from the response via response.getInterestOps().
static class ChannelResponse.Write
          Contains a buffer with the data fully written to the given channel (originally initiated by a prior ChannelRequest.WriteData request).
Method Summary
 NetAgent getAgent()
 IOException getException()
 SelectionKey getKey()
 String toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail


public NetAgent getAgent()


public SelectionKey getKey()


public IOException getException()


public String toString()

Sea 0.4.0