private class SimpleRpcServer.Listener extends Thread
Modifier and Type | Class and Description |
---|---|
private class |
SimpleRpcServer.Listener.Reader |
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private ServerSocketChannel |
acceptChannel |
private int |
currentReader |
private int |
readerPendingConnectionQueueLength |
private SimpleRpcServer.Listener.Reader[] |
readers |
private ExecutorService |
readPool |
private Selector |
selector |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
private void |
closeCurrentConnection(SelectionKey key,
Throwable e) |
(package private) void |
doAccept(SelectionKey key) |
(package private) void |
doRead(SelectionKey key) |
(package private) void |
doStop() |
(package private) InetSocketAddress |
getAddress() |
(package private) SimpleRpcServer.Listener.Reader |
getReader() |
void |
run() |
activeCount, checkAccess, clone, 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
private ServerSocketChannel acceptChannel
private SimpleRpcServer.Listener.Reader[] readers
private int currentReader
private final int readerPendingConnectionQueueLength
private ExecutorService readPool
public Listener(String name) throws IOException
IOException
private void closeCurrentConnection(SelectionKey key, Throwable e)
InetSocketAddress getAddress()
void doAccept(SelectionKey key) throws InterruptedException, IOException, OutOfMemoryError
void doRead(SelectionKey key) throws InterruptedException
InterruptedException
void doStop()
SimpleRpcServer.Listener.Reader getReader()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.