|
|||||||||
| Home >> All >> java >> nio >> [ channels overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.nio.channels
Class Selector

java.lang.Objectjava.nio.channels.Selector
- public abstract class Selector
- extends java.lang.Object
- Since:
- 1.4
| 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 java.util.Set |
keys()
Returns this selector's key set. |
static Selector |
open()
Opens a selector. |
abstract java.nio.channels.spi.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 java.util.Set |
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 |
Selector
protected Selector()
- Initializes the selector.
| Method Detail |
open
public static Selector open() throws java.io.IOException
- Opens a selector.
close
public abstract void close()
throws java.io.IOException
- Closes the selector.
isOpen
public abstract boolean isOpen()
- Tells whether the selector is open or not.
keys
public abstract java.util.Set keys()
- Returns this selector's key set.
provider
public abstract java.nio.channels.spi.SelectorProvider provider()
- Returns the SelectorProvider that created the selector.
select
public abstract int select()
throws java.io.IOException
- Selects a set of keys whose corresponding channels are ready
for I/O operations.
select
public abstract int select(long timeout)
throws java.io.IOException
- Selects a set of keys whose corresponding channels are ready
for I/O operations.
selectedKeys
public abstract java.util.Set selectedKeys()
- Returns this selector's selected-key set.
selectNow
public abstract int selectNow()
throws java.io.IOException
- Selects a set of keys whose corresponding channels are ready
for I/O operations.
wakeup
public abstract Selector wakeup()
- Causes the first selection operation that has not yet returned to
return immediately.
|
|||||||||
| Home >> All >> java >> nio >> [ channels overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java.nio.channels.Selector