public abstract class AbstractSelectionKey extends SelectionKey
AbstractSelectionKey is the base implementation class for selection keys.
It implements validation and cancellation methods.OP_ACCEPT, OP_CONNECT, OP_READ, OP_WRITE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSelectionKey()
Constructs a new
AbstractSelectionKey. |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels this key.
|
boolean |
isValid()
Indicates whether this key is valid.
|
attach, attachment, channel, interestOps, interestOps, isAcceptable, isConnectable, isReadable, isWritable, readyOps, selectorprotected AbstractSelectionKey()
AbstractSelectionKey.public final boolean isValid()
isValid in class SelectionKeytrue if this key has not been canceled, false
otherwise.public final void cancel()
A key that has been canceled is no longer valid. Calling this method on an already canceled key does nothing.
cancel in class SelectionKey