java.nio.channels.spi
public
abstract
class
java.nio.channels.spi.AbstractSelectionKey
Abstract class for selection key.
The class takes charge of the validation and cancellation of key.
Summary
|
|
|
Value |
|
int |
OP_ACCEPT |
Interesting operation mask bit for socket-accept operations. |
16 |
0x00000010 |
int |
OP_CONNECT |
Interesting operation mask bit for socket-connect operations. |
8 |
0x00000008 |
int |
OP_READ |
Interesting operation mask bit for read operations. |
1 |
0x00000001 |
int |
OP_WRITE |
Interesting operation mask bit for write operations. |
4 |
0x00000004 |
Protected Constructors
Public Methods
attach,
attachment,
cancel,
channel,
interestOps,
interestOps,
isAcceptable,
isConnectable,
isReadable,
isValid,
isWritable,
readyOps,
selector
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Protected Constructors
protected
AbstractSelectionKey()
Constructor for this class.
Public Methods
public
final
void
cancel()
Cancels this key and adds it to the cancelled key set.
public
final
boolean
isValid()
Tells whether the key is valid.
Returns
- true if the key has not been cancelled