| ★ wanayoo — archive 1999 http://developer.android.com/reference/java/nio/channels/Selector.html | Nouvelle recherche | Portail wanayoo |
| java.lang.Object | |
| ↳ | java.nio.channels.Selector |
Known Direct Subclasses
|
A controller for selection of SelectableChannel objects. Selectable channels can be registered with a selector, and get SelectionKey as a linkage. The keys are also added to the selector's keyset. The SelectionKey can be cancelled so that the corresponding channel is no longer registered with the selector. By invoking the select operation, the keyset is checked and all keys that are cancelled since last select operation are moved to cancelledKey set. During the select operation, the channels registered with this selector are checked to see whether they are ready for operation according to their interesting operation.
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
The constructor.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Closes this selector.
| |||||||||||
Tells whether this selector is open.
| |||||||||||
Gets the set of registered keys.
| |||||||||||
The factory method for selector.
| |||||||||||
Gets the provider of this selector.
| |||||||||||
Detects if any of the registered channels are ready for I/O operations
according to their interesting operation.
| |||||||||||
Detects if any of the registered channels are ready for I/O operations
according to their interesting operation.This operation will not return
until some of the channels are ready or wakeup is invoked or timeout
expired.
| |||||||||||
Detects if any of the registered channels are ready for I/O operations
according to their interesting operation.This operation will not return
immediately.
| |||||||||||
Gets the keys whose channels are ready for operation.
| |||||||||||
Forces the blocked select operation to return immediately.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
The constructor.
Closes this selector.
| IOException | if I/O error occurs |
|---|
Tells whether this selector is open.
Gets the set of registered keys.
Gets the provider of this selector.
Detects if any of the registered channels are ready for I/O operations according to their interesting operation. This operation will not return until some of the channels are ready or wakeup is invoked.
| IOException | if I/O error occurs |
|---|---|
| ClosedSelectorException | If the selector is closed |
Detects if any of the registered channels are ready for I/O operations according to their interesting operation.This operation will not return until some of the channels are ready or wakeup is invoked or timeout expired.
| timeout | the timeout in millisecond |
|---|
| IOException | if I/O error occurs |
|---|---|
| ClosedSelectorException | If the selector is closed |
| IllegalArgumentException | If the given timeout argument is less than zero |
Detects if any of the registered channels are ready for I/O operations according to their interesting operation.This operation will not return immediately.
| IOException | if I/O error occur |
|---|---|
| ClosedSelectorException | If the selector is closed |
Gets the keys whose channels are ready for operation.
Forces the blocked select operation to return immediately. If no select operation is blocked currently, the next select operation shall return immediately.
| ClosedSelectorException | If the selector is closed |
|---|