public abstract class AbstractSelectorThread extends ManagedRunnable implements Runnable
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
_logger |
protected Pivot |
_pivot |
protected Thread |
ownerThread |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSelectorThread(Pivot pivot) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancelKey(SelectionKey key) |
protected void |
closeChannel(SocketChannel channel)
Close a given channel
|
protected abstract void |
enableSelectionKeys() |
protected Selector |
getSelector() |
protected abstract void |
handleConnection(SelectionKey key) |
protected SelectionKey |
register(SocketChannel channel,
int requestOps) |
void |
run() |
protected void |
waitWhileFinish()
This method will be invoked by requestShutdown().
|
requestShutdown, shouldShutdownprotected static final Logger _logger
protected final Pivot _pivot
protected volatile Thread ownerThread
protected AbstractSelectorThread(Pivot pivot) throws IOException
IOExceptionprotected SelectionKey register(SocketChannel channel, int requestOps) throws ClosedChannelException
ClosedChannelExceptionprotected abstract void enableSelectionKeys()
protected abstract void handleConnection(SelectionKey key) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected void cancelKey(SelectionKey key)
protected void closeChannel(SocketChannel channel)
channel - target channel to close.protected void waitWhileFinish()
ManagedRunnablewaitWhileFinish in class ManagedRunnableprotected Selector getSelector()
Copyright © GigaSpaces.