|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.nio.channels.Selector
public abstract class Selector
| Constructor Summary | |
|---|---|
protected |
Selector()
Initializes the selector. |
| Method Summary | |
|---|---|
abstract void |
close()
Closes the selector. |
abstract boolean |
isOpen()
Tells whether the selector is open or not. |
abstract Set<SelectionKey> |
keys()
Returns this selector's key set. |
static Selector |
open()
Opens a selector. |
abstract SelectorProvider |
provider()
Returns the SelectorProvider that created the selector. |
abstract int |
select()
Selects a set of keys whose corresponding channels are ready for I/O operations. |
abstract int |
select(long timeout)
Selects a set of keys whose corresponding channels are ready for I/O operations. |
abstract Set<SelectionKey> |
selectedKeys()
Returns this selector's selected-key set. |
abstract int |
selectNow()
Selects a set of keys whose corresponding channels are ready for I/O operations. |
abstract Selector |
wakeup()
Causes the first selection operation that has not yet returned to return immediately. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Selector()
| Method Detail |
|---|
public static Selector open()
throws IOException
IOException - If an error occurs
public abstract void close()
throws IOException
IOException - If an error occurspublic abstract boolean isOpen()
public abstract Set<SelectionKey> keys()
ClosedSelectorException - If this selector is closed.public abstract SelectorProvider provider()
public abstract int select()
throws IOException
ClosedSelectorException - If this selector is closed.
IOException - If an error occurs
public abstract int select(long timeout)
throws IOException
timeout - The timeout to use.
ClosedSelectorException - If this selector is closed.
IllegalArgumentException - If the timeout value is negative.
IOException - If an error occurspublic abstract Set<SelectionKey> selectedKeys()
ClosedSelectorException - If this selector is closed.
public abstract int selectNow()
throws IOException
ClosedSelectorException - If this selector is closed.
IOException - If an error occurspublic abstract Selector wakeup()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||