|
|||||||||
| 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
| Constructor Summary | |
|---|---|
protected |
AbstractSelector(SelectorProvider provider)
Initializes the slector. |
| Method Summary | |
|---|---|
protected void |
begin()
Marks the beginning of an I/O operation that might block indefinitely. |
protected Set<SelectionKey> |
cancelledKeys()
Returns the cancelled keys set. |
void |
close()
Closes the channel. |
protected void |
deregister(AbstractSelectionKey key)
Deregisters the given selection key. |
protected void |
end()
Marks the end of an I/O operation that might block indefinitely. |
protected abstract void |
implCloseSelector()
Closes the channel. |
boolean |
isOpen()
Tells whether this channel is open or not. |
SelectorProvider |
provider()
Returns the provider for this selector object. |
protected abstract SelectionKey |
register(AbstractSelectableChannel ch,
int ops,
Object att)
Registers a channel for the selection process. |
| 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 provider)
provider - the provider that created this selector| Method Detail |
|---|
public final void close()
throws IOException
close in class SelectorIOException - If an error occurspublic final boolean isOpen()
isOpen in class Selectorprotected final void begin()
protected final void end()
public final SelectorProvider provider()
provider in class Selectorprotected final Set<SelectionKey> cancelledKeys()
protected abstract void implCloseSelector()
throws IOException
IOException - if an error occurs
protected abstract SelectionKey register(AbstractSelectableChannel ch,
int ops,
Object att)
ch - the channel registerops - the interested operationsatt - an attachement to the selection key
protected final void deregister(AbstractSelectionKey key)
key - the key to deregister
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||