java.io.Closeable, java.lang.AutoCloseableAcceptingSelector, SocketSelectorpublic abstract class ESSelector
extends java.lang.Object
implements java.io.Closeable
NioTransport. This
selector wraps a raw nio Selector. When you call runLoop(), the selector will run until
close() is called. This instance handles closing of channels. Users should call
queueChannelClose(NioChannel) to schedule a channel for close by this selector.
Children of this class should implement the specific processKey(SelectionKey),
preSelect(), and cleanup() functionality.
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
boolean |
isOnCurrentThread() |
|
boolean |
isOpen() |
|
boolean |
isRunning() |
|
PlainActionFuture<java.lang.Boolean> |
isRunningFuture() |
|
void |
queueChannelClose(NioChannel channel) |
|
java.nio.channels.Selector |
rawSelector() |
|
void |
runLoop() |
Starts this selector.
|
public void runLoop()
close() is called.public boolean isOnCurrentThread()
public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOExceptionpublic void queueChannelClose(NioChannel channel)
public java.nio.channels.Selector rawSelector()
public boolean isOpen()
public boolean isRunning()
public PlainActionFuture<java.lang.Boolean> isRunningFuture()