java.nio.channels.spi
public abstract class AbstractSelector extends Selector
Constructor Summary | |
---|---|
protected | AbstractSelector(SelectorProvider provider)
Initializes the slector.
|
Method Summary | |
---|---|
protected void | begin()
Marks the beginning of an I/O operation that might block indefinitely. |
protected Set<SelectionKey> | cancelledKeys()
Returns the cancelled keys set.
|
void | close()
Closes the channel.
|
protected void | deregister(AbstractSelectionKey key)
Deregisters the given selection key.
|
protected void | end()
Marks the end of an I/O operation that might block indefinitely. |
protected abstract void | implCloseSelector()
Closes the channel.
|
boolean | isOpen()
Tells whether this channel is open or not.
|
SelectorProvider | provider()
Returns the provider for this selector object.
|
protected abstract SelectionKey | register(AbstractSelectableChannel ch, int ops, Object att)
Registers a channel for the selection process.
|
Parameters: provider the provider that created this selector
Returns: the cancelled keys set
Throws: IOException If an error occurs
Parameters: key the key to deregister
Throws: IOException if an error occurs
Returns: true if channel is open, false otherwise.
Returns: the SelectorProvider object that created this seletor
Parameters: ch the channel register ops the interested operations att an attachement to the selection key
Returns: the registered selection key