SelectionKey
Class SelectionKey
- java.lang.Object
-
- java.nio.channels.SelectionKey
- Direct Known Subclasses:
- AbstractSelectionKey
public abstract class SelectionKey extends Object
A token representing the registration of a SelectableChannel
with a Selector
.
A selection key is created each time a channel is registered with a selector. A key remains valid until it is cancelled by invoking its cancel
method, by closing its channel, or by closing its selector. Cancelling a key does not immediately remove it from its selector; it is instead added to the selector's 登录查看完整内容