|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.channels.Selector
java.nio.channels.spi.AbstractSelector
public abstract class AbstractSelector
Abstract class for selectors.
This class realizes the interruption of selection by begin and
end. It also holds the cancelled and the deletion of the key
set.
| Constructor Summary | |
|---|---|
protected |
AbstractSelector(SelectorProvider selectorProvider)
Constructor for this class. |
| Method Summary | |
|---|---|
protected void |
begin()
This starts a potentially blocking I/O operation |
(package private) void |
cancel(SelectionKey key)
|
protected Set<SelectionKey> |
cancelledKeys()
Returns the cancelled key set of this channel. |
void |
close()
Closes this channel. |
protected void |
deregister(AbstractSelectionKey key)
Deletes the key from channel's key set. |
protected void |
end()
This ends a potentially blocking I/O operation |
protected abstract void |
implCloseSelector()
Implements the closing of this channel. |
boolean |
isOpen()
Tells whether this selector is open. |
SelectorProvider |
provider()
Returns the SelectorProvider of this channel. |
protected abstract SelectionKey |
register(AbstractSelectableChannel channel,
int operations,
Object attachment)
Registers a channel to this selector. |
| Methods inherited from class java.nio.channels.Selector |
|---|
keys, open, select, select, selectedKeys, selectNow, wakeup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractSelector(SelectorProvider selectorProvider)
selectorProvider - A instance of SelectorProvider| Method Detail |
|---|
public final void close()
throws IOException
close in class SelectorIOException - if I/O error occursSelector.close()
protected abstract void implCloseSelector()
throws IOException
IOException - If some I/O exception occurs.public final boolean isOpen()
Selector
isOpen in class SelectorSelector.isOpen()public final SelectorProvider provider()
provider in class SelectorSelector.provider()protected final Set<SelectionKey> cancelledKeys()
protected abstract SelectionKey register(AbstractSelectableChannel channel,
int operations,
Object attachment)
channel - The channel to be registered.operations - The interest set.attachment - The attachment of the key.
protected final void deregister(AbstractSelectionKey key)
key - The key.protected final void begin()
protected final void end()
void cancel(SelectionKey key)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||