java.lang.Object | ||
↳ | java.nio.channels.Selector | |
↳ | java.nio.channels.spi.AbstractSelector |
AbstractSelector
is the base implementation class for selectors.
It realizes the interruption of selection by
begin
and
end
. It also holds the cancellation and the deletion of the key
set.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Closes this selector.
|
||||||||||
|
Returns true if this selector is open.
|
||||||||||
|
Returns this selector's provider.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Indicates the beginning of a code section that includes an I/O operation
that is potentially blocking.
|
||||||||||
|
Returns this channel's set of canceled selection keys.
|
||||||||||
|
Deletes the key from the channel's key set.
|
||||||||||
|
Indicates the end of a code section that has been started with
begin()
and that includes a potentially blocking I/O operation.
|
||||||||||
|
Implements the closing of this channel.
|
||||||||||
|
Registers
channel
with this selector.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.nio.channels.Selector
|
|||||||||||
From class
java.lang.Object
|
|||||||||||
From interface
java.io.Closeable
|
|||||||||||
From interface
java.lang.AutoCloseable
|
Closes this selector. This method does nothing if this selector is
already closed. The actual closing must be implemented by subclasses in
implCloseSelector()
.
IOException |
---|
Returns true if this selector is open.
true
if this selector is not closed,
false
otherwise.
Returns this selector's provider.
Indicates the beginning of a code section that includes an I/O operation
that is potentially blocking. After this operation, the application
should invoke the corresponding
end(boolean)
method.
Returns this channel's set of canceled selection keys.
Deletes the key from the channel's key set.
Indicates the end of a code section that has been started with
begin()
and that includes a potentially blocking I/O operation.
Implements the closing of this channel.
IOException |
---|
Registers
channel
with this selector.
operations |
the
interest set
of
channel
.
|
---|---|
attachment | the attachment for the selection key. |