THsHaServer
public class TNonblockingServer extends AbstractNonblockingServer
Modifier and Type | Class | Description |
---|---|---|
static class |
TNonblockingServer.Args |
|
protected class |
TNonblockingServer.SelectAcceptThread |
The thread that will be doing all the selecting, managing new connections
and those that still need to be read.
|
AbstractNonblockingServer.AbstractNonblockingServerArgs<T extends AbstractNonblockingServer.AbstractNonblockingServerArgs<T>>, AbstractNonblockingServer.AbstractSelectThread, AbstractNonblockingServer.AsyncFrameBuffer, AbstractNonblockingServer.FrameBuffer
TServer.AbstractServerArgs<T extends TServer.AbstractServerArgs<T>>
LOGGER
eventHandler_, inputProtocolFactory_, inputTransportFactory_, outputProtocolFactory_, outputTransportFactory_, processorFactory_, serverTransport_
Constructor | Description |
---|---|
TNonblockingServer(AbstractNonblockingServer.AbstractNonblockingServerArgs args) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
isStopped() |
|
protected void |
joinSelector() |
Block until the selector thread exits.
|
protected boolean |
requestInvoke(AbstractNonblockingServer.FrameBuffer frameBuffer) |
Perform an invocation.
|
protected boolean |
startThreads() |
Start the selector thread to deal with accepts and client messages.
|
void |
stop() |
Stop serving and shut everything down.
|
protected void |
waitForShutdown() |
A method that will block until when threads handling the serving have been
shut down.
|
serve, startListening, stopListening
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventHandler, isServing, setServerEventHandler, setServing
public TNonblockingServer(AbstractNonblockingServer.AbstractNonblockingServerArgs args)
protected boolean startThreads()
startThreads
in class AbstractNonblockingServer
protected void waitForShutdown()
AbstractNonblockingServer
waitForShutdown
in class AbstractNonblockingServer
protected void joinSelector()
protected boolean requestInvoke(AbstractNonblockingServer.FrameBuffer frameBuffer)
requestInvoke
in class AbstractNonblockingServer
public boolean isStopped()