Package org.apache.thrift.server
Class TServer
java.lang.Object
org.apache.thrift.server.TServer
- Direct Known Subclasses:
AbstractNonblockingServer,TSaslNonblockingServer,TSimpleServer,TThreadPoolServer
Generic interface for a Thrift server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TServerEventHandlerprotected TProtocolFactoryInput Protocol Factoryprotected TTransportFactoryInput Transport Factoryprotected TProtocolFactoryOutput Protocol Factoryprotected TTransportFactoryOutput Transport Factoryprotected TProcessorFactoryCore processorprotected TServerTransportServer transportprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanabstract voidserve()The run method fires up the server and gets things going.voidsetServerEventHandler(TServerEventHandler eventHandler) protected voidsetServing(boolean serving) voidsetShouldStop(boolean shouldStop) voidstop()Stop the server.
-
Field Details
-
processorFactory_
Core processor -
serverTransport_
Server transport -
inputTransportFactory_
Input Transport Factory -
outputTransportFactory_
Output Transport Factory -
inputProtocolFactory_
Input Protocol Factory -
outputProtocolFactory_
Output Protocol Factory -
eventHandler_
-
stopped_
protected volatile boolean stopped_
-
-
Constructor Details
-
TServer
-
-
Method Details
-
serve
public abstract void serve()The run method fires up the server and gets things going. -
stop
public void stop()Stop the server. This is optional on a per-implementation basis. Not all servers are required to be cleanly stoppable. -
isServing
public boolean isServing() -
setServing
protected void setServing(boolean serving) -
setServerEventHandler
-
getEventHandler
-
getShouldStop
public boolean getShouldStop() -
setShouldStop
public void setShouldStop(boolean shouldStop)
-