Example usage for Java java.nio.channels SelectionKey fields, constructors, methods, implement or subclass
The text is from its open source code.
int | OP_READ Operation-set bit for read operations. |
int | OP_WRITE Operation-set bit for write operations. |
int | OP_CONNECT Operation-set bit for socket-connect operations. |
int | OP_ACCEPT Operation-set bit for socket-accept operations. |
Object | attachment |
Object | attach(Object ob) Attaches the given object to this key. |
void | cancel() Requests that the registration of this key's channel with its selector be cancelled. |
SelectableChannel | channel() Returns the channel for which this key was created. |
boolean | equals(Object obj) Indicates whether some other object is "equal to" this one. |
SelectionKey | interestOps(int ops) Sets this key's interest set to the given value. |
int | interestOps() Retrieves this key's interest set. |
boolean | isAcceptable() Tests whether this key's channel is ready to accept a new socket connection. |
boolean | isConnectable() Tests whether this key's channel has either finished, or failed to finish, its socket-connection operation. |
boolean | isReadable() Tests whether this key's channel is ready for reading. |
boolean | isValid() Tells whether or not this key is valid. |
boolean | isWritable() Tests whether this key's channel is ready for writing. |
int | readyOps() Retrieves this key's ready-operation set. |
Selector | selector() Returns the selector for which this key was created. |