Sea 0.4.0

gov.lbl.dsd.sea.nio.event
Class ChannelRequest.Register

java.lang.Object
  extended bygov.lbl.dsd.sea.event.CallbackEvent
      extended bygov.lbl.dsd.sea.event.GenericCallbackEvent
          extended bygov.lbl.dsd.sea.nio.event.ChannelRequest.Register
Enclosing class:
ChannelRequest

public static class ChannelRequest.Register
extends GenericCallbackEvent

Requests an agent to register the given SelectionKeyinterest ops with the given channel; The agent will enqueue future responses to the channel onto the given observer stage; If an attachment is given the agent will attach it to the channel's key.


Constructor Summary
ChannelRequest.Register(Stage observer, SelectableChannel channel, int interestOps)
           
ChannelRequest.Register(Stage observer, SelectableChannel channel, int interestOps, Object attachment)
           
 
Method Summary
 Object getAttachment()
          Returns the attachment the agent should attach to the channel's key.
 SelectableChannel getChannel()
           
 int getInterestOps()
           
 boolean hasAttachment()
          Returns whether or not the request contains an attachment.
 
Methods inherited from class gov.lbl.dsd.sea.event.GenericCallbackEvent
getInfo, getMessage, toString
 
Methods inherited from class gov.lbl.dsd.sea.event.CallbackEvent
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChannelRequest.Register

public ChannelRequest.Register(Stage observer,
                               SelectableChannel channel,
                               int interestOps)

ChannelRequest.Register

public ChannelRequest.Register(Stage observer,
                               SelectableChannel channel,
                               int interestOps,
                               Object attachment)
Method Detail

getInterestOps

public int getInterestOps()

getChannel

public SelectableChannel getChannel()

getAttachment

public Object getAttachment()
Returns the attachment the agent should attach to the channel's key.

Throws:
IllegalStateException - if hasAttachment() == false.

hasAttachment

public boolean hasAttachment()
Returns whether or not the request contains an attachment.


Sea 0.4.0