public class SelectorThread
extends java.lang.Thread
Constructor and Description |
---|
SelectorThread(SelectionHandler selectionHandler) |
Modifier and Type | Method and Description |
---|---|
void |
closeSelector() |
int |
getKeySize() |
SelectionHandler |
getSelectionHandler() |
boolean |
isBusy()
returns true if this selector is currently processing some work load.
|
boolean |
isStopped() |
boolean |
isValid() |
java.nio.channels.SelectionKey |
register(java.nio.channels.SelectableChannel channel) |
java.nio.channels.SelectionKey |
register(java.nio.channels.SelectableChannel channel,
java.lang.Object attachment) |
void |
run() |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public SelectorThread(SelectionHandler selectionHandler) throws java.io.IOException
java.io.IOException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean isValid()
public void closeSelector()
public java.nio.channels.SelectionKey register(java.nio.channels.SelectableChannel channel, java.lang.Object attachment) throws java.nio.channels.ClosedChannelException
java.nio.channels.ClosedChannelException
public java.nio.channels.SelectionKey register(java.nio.channels.SelectableChannel channel) throws java.nio.channels.ClosedChannelException
java.nio.channels.ClosedChannelException
public int getKeySize()
public boolean isStopped()
public SelectionHandler getSelectionHandler()
public boolean isBusy()