java.nio.channels
abstract public class: SelectionKey [javadoc |
source]
java.lang.Object
java.nio.channels.SelectionKey
Direct Known Subclasses:
AbstractSelectionKey
A {@code SelectionKey} represents the relationship between a channel and a
selector for which the channel is registered.
Operation set
An operation set is represented by an integer value. The bits of an operation
set represent categories of operations for a key's channel: Accepting socket
connections ({@code OP_ACCEPT}), connecting with a socket ({@code OP_CONNECT}),
reading ({@code OP_READ}) and writing ({@code OP_WRITE}).
Interest set
The interest set is an operation set that defines the operations that a
channel is interested in performing.
Ready set
The ready set is an operation set that shows the operations that a
{@code channel} is ready to execute.
| Field Summary |
|---|
| public static final int | OP_ACCEPT | Interest set mask bit for socket-accept operations. |
| public static final int | OP_CONNECT | Interest set mask bit for socket-connect operations. |
| public static final int | OP_READ | Interesting operation mask bit for read operations. |
| public static final int | OP_WRITE | Interest set mask bit for write operations. |
| Method from java.nio.channels.SelectionKey Summary: |
|---|
|
attach, attachment, cancel, channel, interestOps, interestOps, isAcceptable, isConnectable, isReadable, isValid, isWritable, readyOps, selector |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |