java.nio.channels.spi
Class AbstractSelectionKey
java.lang.Object
java.nio.channels.SelectionKey
java.nio.channels.spi.AbstractSelectionKey
public abstract class AbstractSelectionKey
- extends SelectionKey
- Since:
- 1.4
Method Summary |
void |
cancel()
Cancels this key. |
boolean |
isValid()
Tells whether this key is valid or not. |
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 |
AbstractSelectionKey
protected AbstractSelectionKey()
- Initializes the key.
cancel
public final void cancel()
- Cancels this key.
- Specified by:
cancel
in class SelectionKey
isValid
public final boolean isValid()
- Tells whether this key is valid or not.
- Specified by:
isValid
in class SelectionKey
- Returns:
- true if this key is valid, false otherwise