org.apache.thrift.server

## Class TServer

- java.lang.Object
- - org.apache.thrift.server.TServer

- Direct Known Subclasses:
    TNonblockingServer, TSimpleServer, TThreadPoolServer

      public abstract class TServer
      extends java.lang.Object

  Generic interface for a Thrift server.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TServer.AbstractServerArgs<T extends TServer.AbstractServerArgs<T>>`
    `static class` | `TServer.Args`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TProtocolFactory` | `inputProtocolFactory_` Input Protocol Factory
    `protected TTransportFactory` | `inputTransportFactory_` Input Transport Factory
    `protected TProtocolFactory` | `outputProtocolFactory_` Output Protocol Factory
    `protected TTransportFactory` | `outputTransportFactory_` Output Transport Factory
    `protected TProcessorFactory` | `processorFactory_` Core processor
    `protected TServerTransport` | `serverTransport_` Server transport

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TServer(TServer.AbstractServerArgs args)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isServing()`
    `abstract void` | `serve()` The run method fires up the server and gets things going.
    `protected void` | `setServing(boolean serving)`
    `void` | `stop()` Stop the server.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### processorFactory_

          protected TProcessorFactory processorFactory_

      Core processor

    - #### serverTransport_

          protected TServerTransport serverTransport_

      Server transport

    - #### inputTransportFactory_

          protected TTransportFactory inputTransportFactory_

      Input Transport Factory

    - #### outputTransportFactory_

          protected TTransportFactory outputTransportFactory_

      Output Transport Factory

    - #### inputProtocolFactory_

          protected TProtocolFactory inputProtocolFactory_

      Input Protocol Factory

    - #### outputProtocolFactory_

          protected TProtocolFactory outputProtocolFactory_

      Output Protocol Factory

  - ### Constructor Detail

    - #### TServer

          protected TServer(TServer.AbstractServerArgs args)

  - ### Method Detail

    - #### 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)