Uses of Class
java.nio.channels.SelectionKey
| Package | Description |
|---|---|
| java.nio.channels | |
| java.nio.channels.spi |
-
Uses of SelectionKey in java.nio.channels
Methods in java.nio.channels that return SelectionKey Modifier and Type Method Description abstract SelectionKeySelectionKey. interestOps(int operations)Sets theinterest setfor this key.abstract SelectionKeySelectableChannel. keyFor(Selector sel)Gets this channel's selection key for the specified selector.SelectionKeySelectableChannel. register(Selector selector, int operations)Registers this channel with the specified selector for the specified interest set.abstract SelectionKeySelectableChannel. register(Selector sel, int ops, Object att)Registers this channel with the specified selector for the specified interest set and an object to attach.Methods in java.nio.channels that return types with arguments of type SelectionKey Modifier and Type Method Description abstract Set<SelectionKey>Selector. keys()Gets the set of registered keys.abstract Set<SelectionKey>Selector. selectedKeys()Gets the selection keys whose channels are ready for operation. -
Uses of SelectionKey in java.nio.channels.spi
Subclasses of SelectionKey in java.nio.channels.spi Modifier and Type Class Description classAbstractSelectionKeyAbstractSelectionKeyis the base implementation class for selection keys.Methods in java.nio.channels.spi that return SelectionKey Modifier and Type Method Description SelectionKeyAbstractSelectableChannel. keyFor(Selector selector)Gets this channel's selection key for the specified selector.SelectionKeyAbstractSelectableChannel. register(Selector selector, int interestSet, Object attachment)Registers this channel with the specified selector for the specified interest set.protected abstract SelectionKeyAbstractSelector. register(AbstractSelectableChannel channel, int operations, Object attachment)Registerschannelwith this selector.Methods in java.nio.channels.spi that return types with arguments of type SelectionKey Modifier and Type Method Description protected Set<SelectionKey>AbstractSelector. cancelledKeys()Returns this channel's set of canceled selection keys.