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, yieldpublic SelectorThread(SelectionHandler selectionHandler) throws java.io.IOException
java.io.IOExceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic 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.ClosedChannelExceptionpublic java.nio.channels.SelectionKey register(java.nio.channels.SelectableChannel channel)
throws java.nio.channels.ClosedChannelException
java.nio.channels.ClosedChannelExceptionpublic int getKeySize()
public boolean isStopped()
public SelectionHandler getSelectionHandler()
public boolean isBusy()