|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.thrift.server.TServer
org.apache.thrift.server.AbstractNonblockingServer
public abstract class AbstractNonblockingServer
Provides common methods and classes used by nonblocking TServer implementations.
| Nested Class Summary | |
|---|---|
static class |
AbstractNonblockingServer.AbstractNonblockingServerArgs<T extends AbstractNonblockingServer.AbstractNonblockingServerArgs<T>>
|
protected class |
AbstractNonblockingServer.AbstractSelectThread
An abstract thread that handles selecting on a set of transports and FrameBuffers associated with selected keys
corresponding to requests. |
protected class |
AbstractNonblockingServer.FrameBuffer
Class that implements a sort of state machine around the interaction with a client and an invoker. |
| Nested classes/interfaces inherited from class org.apache.thrift.server.TServer |
|---|
TServer.AbstractServerArgs<T extends TServer.AbstractServerArgs<T>>, TServer.Args |
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
LOGGER
|
| Fields inherited from class org.apache.thrift.server.TServer |
|---|
eventHandler_, inputProtocolFactory_, inputTransportFactory_, outputProtocolFactory_, outputTransportFactory_, processorFactory_, serverTransport_ |
| Constructor Summary | |
|---|---|
AbstractNonblockingServer(AbstractNonblockingServer.AbstractNonblockingServerArgs args)
|
|
| Method Summary | |
|---|---|
TServerEventHandler |
getEventHandler()
|
protected abstract boolean |
requestInvoke(AbstractNonblockingServer.FrameBuffer frameBuffer)
Perform an invocation. |
void |
serve()
Begin accepting connections and processing invocations. |
void |
setServerEventHandler(TServerEventHandler eventHandler)
|
protected boolean |
startListening()
Have the server transport start accepting connections. |
protected abstract boolean |
startThreads()
Starts any threads required for serving. |
protected void |
stopListening()
Stop listening for connections. |
protected abstract void |
waitForShutdown()
A method that will block until when threads handling the serving have been shut down. |
| Methods inherited from class org.apache.thrift.server.TServer |
|---|
isServing, setServing, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger LOGGER
| Constructor Detail |
|---|
public AbstractNonblockingServer(AbstractNonblockingServer.AbstractNonblockingServerArgs args)
| Method Detail |
|---|
public void serve()
serve in class TServerprotected abstract boolean startThreads()
protected abstract void waitForShutdown()
protected boolean startListening()
protected void stopListening()
protected abstract boolean requestInvoke(AbstractNonblockingServer.FrameBuffer frameBuffer)
public void setServerEventHandler(TServerEventHandler eventHandler)
setServerEventHandler in class TServerpublic TServerEventHandler getEventHandler()
getEventHandler in class TServer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||