Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected DispatcherManager |
dispatcherManager |
protected Selector |
selector |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
Dispatcher(DispatcherManager dispatcherManager) |
Dispatcher(DispatcherManager dispatcherManager,
String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
handleAcceptEvent(SelectionKey key) |
protected void |
handleConnectEvent(SelectionKey key) |
protected void |
handleReadEvent(SelectionKey key) |
protected void |
handleRegister() |
protected void |
handleUnregister() |
protected void |
handleWriteEvent(SelectionKey key) |
void |
interrupt() |
void |
registerChannel(SelectableChannel channel,
int ops) |
void |
registerChannel(SelectableChannel channel,
int ops,
Session sess) |
void |
registerSession(int ops,
Session sess) |
void |
run() |
void |
unregisterSession(Session sess) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected volatile Selector selector
protected final DispatcherManager dispatcherManager
public Dispatcher(DispatcherManager dispatcherManager, String name) throws IOException
IOExceptionpublic Dispatcher(DispatcherManager dispatcherManager) throws IOException
IOExceptionpublic void registerChannel(SelectableChannel channel, int ops) throws IOException
IOExceptionpublic void registerSession(int ops,
Session sess)
throws IOException
IOExceptionpublic void registerChannel(SelectableChannel channel, int ops, Session sess) throws IOException
IOExceptionpublic void unregisterSession(Session sess)
protected void handleRegister()
protected void handleUnregister()
protected void handleAcceptEvent(SelectionKey key) throws IOException
IOExceptionprotected void handleConnectEvent(SelectionKey key) throws IOException
IOExceptionprotected void handleReadEvent(SelectionKey key) throws IOException
IOExceptionprotected void handleWriteEvent(SelectionKey key) throws IOException
IOExceptionCopyright © 2015. All rights reserved.