gov.lbl.dsd.sea.nio.event
Class ChannelRequest.Register
java.lang.Object
gov.lbl.dsd.sea.event.CallbackEvent
gov.lbl.dsd.sea.event.GenericCallbackEvent
gov.lbl.dsd.sea.nio.event.ChannelRequest.Register
- Enclosing class:
- ChannelRequest
- public static class ChannelRequest.Register
- extends GenericCallbackEvent
Requests an agent to register the given
SelectionKey
interest 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.
ChannelRequest.Register
public ChannelRequest.Register(Stage observer,
SelectableChannel channel,
int interestOps)
ChannelRequest.Register
public ChannelRequest.Register(Stage observer,
SelectableChannel channel,
int interestOps,
Object attachment)
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.