Build 1.0_r1(from source)

java.nio.channels.spi
Class AbstractSelectionKey

java.lang.Object
  extended by java.nio.channels.SelectionKey
      extended by 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
           
 
Fields inherited from class java.nio.channels.SelectionKey
OP_ACCEPT, OP_CONNECT, OP_READ, OP_WRITE
 
Constructor Summary
protected AbstractSelectionKey()
          Constructor for this class.
 
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
 

Field Detail

isValid

boolean isValid
Constructor Detail

AbstractSelectionKey

protected AbstractSelectionKey()
Constructor for this class.

Method Detail

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()

Build 1.0_r1(from source)

Please submit a feedback, bug or feature