java.nio.channels
Class Selector
java.lang.Object
|
+--java.nio.channels.Selector
public abstract class
Selectorextends
Object Since:Author:Selector
protected Selector() Initializes the selector.
close
public void close() Closes the selector.
Throws:
isOpen
public boolean isOpen() Tells whether the selector is open or not.
keys
public Set keys() Returns this selector's key set.
Throws:
open
public static Selector open() Opens a selector.
Throws:
provider
public SelectorProvider provider() Returns the SelectorProvider that created the selector.
select
public int select() Selects a set of keys whose corresponding channels are ready
for I/O operations.
Throws:
select
public int select(long timeout) Selects a set of keys whose corresponding channels are ready
for I/O operations.
Parameters:
Throws:
selectNow
public int selectNow() Selects a set of keys whose corresponding channels are ready
for I/O operations.
Throws:
selectedKeys
public Set selectedKeys() Returns this selector's selected-key set.
Throws:
wakeup
public Selector wakeup() Causes the first selection operation that has not yet returned to
return immediately.