java.nio.channels.spi
Class AbstractSelectionKey
java.lang.Object
java.nio.channels.SelectionKey
java.nio.channels.spi.AbstractSelectionKey
public abstract class AbstractSelectionKey
- extends SelectionKey
Abstract class for selection key.
The class takes charge of the validation and cancellation of key.
|
Field Summary |
(package private) boolean |
isValid
|
|
Method Summary |
void |
cancel()
Cancels this key and adds it to the cancelled key set. |
boolean |
isValid()
Tells whether the key is valid. |
| Methods inherited from class java.nio.channels.SelectionKey |
attach, attachment, channel, interestOps, interestOps, isAcceptable, isConnectable, isReadable, isWritable, readyOps, selector |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isValid
boolean isValid
AbstractSelectionKey
protected AbstractSelectionKey()
- Constructor for this class.
isValid
public final boolean isValid()
- Description copied from class:
SelectionKey
- Tells whether the key is valid.
- Specified by:
isValid in class SelectionKey
- Returns:
- true if the key has not been cancelled
- See Also:
SelectionKey.isValid()
cancel
public final void cancel()
- Cancels this key and adds it to the cancelled key set.
- Specified by:
cancel in class SelectionKey
- See Also:
SelectionKey.cancel()
Please submit a feedback, bug or feature