org.apache.thrift.server
Class THsHaServer

java.lang.Object
  extended by org.apache.thrift.server.TServer
      extended by org.apache.thrift.server.TNonblockingServer
          extended by org.apache.thrift.server.THsHaServer

public class THsHaServer
extends TNonblockingServer

An extension of the TNonblockingServer to a Half-Sync/Half-Async server. Like TNonblockingServer, it relies on the use of TFramedTransport.


Nested Class Summary
static class THsHaServer.Options
           
 
Constructor Summary
THsHaServer(TProcessorFactory processorFactory, TNonblockingServerTransport serverTransport)
          Create server with specified processor factory and server transport.
THsHaServer(TProcessorFactory processorFactory, TNonblockingServerTransport serverTransport, TFramedTransport.Factory transportFactory, TProtocolFactory protocolFactory)
          Create server with specified processor factory, server transport, in/out transport factory, in/out protocol factory, and default server options.
THsHaServer(TProcessorFactory processorFactory, TNonblockingServerTransport serverTransport, TFramedTransport.Factory transportFactory, TProtocolFactory protocolFactory, THsHaServer.Options options)
          Create server with specified processor factory, server transport, in/out transport factory, in/out protocol factory, and server options.
THsHaServer(TProcessorFactory processorFactory, TNonblockingServerTransport serverTransport, TFramedTransport.Factory outputTransportFactory, TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory)
          Create server with everything specified, except use default server options.
THsHaServer(TProcessorFactory processorFactory, TNonblockingServerTransport serverTransport, TFramedTransport.Factory outputTransportFactory, TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory, java.util.concurrent.ExecutorService executor, TNonblockingServer.Options options)
          Create server with every option fully specified, and with an injected ExecutorService
THsHaServer(TProcessorFactory processorFactory, TNonblockingServerTransport serverTransport, TFramedTransport.Factory outputTransportFactory, TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory, THsHaServer.Options options)
          Create server with every option fully specified, with an internally managed ExecutorService
THsHaServer(TProcessorFactory processorFactory, TNonblockingServerTransport serverTransport, THsHaServer.Options options)
          Create server with specified processor factory, server transport, and server options.
THsHaServer(TProcessor processor, TNonblockingServerTransport serverTransport)
          Create server with given processor, and server transport.
THsHaServer(TProcessor processor, TNonblockingServerTransport serverTransport, TFramedTransport.Factory transportFactory, TProtocolFactory protocolFactory)
          Create server with specified processor, server transport, in/out transport factory, in/out protocol factory, and default server options.
THsHaServer(TProcessor processor, TNonblockingServerTransport serverTransport, TFramedTransport.Factory outputTransportFactory, TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory)
          Create server with everything specified, except use default server options.
THsHaServer(TProcessor processor, TNonblockingServerTransport serverTransport, THsHaServer.Options options)
          Create server with given processor, server transport, and server options using TBinaryProtocol for the protocol, and TFramedTransport.Factory on both input and output transports.
THsHaServer(TProcessor processor, TNonblockingServerTransport serverTransport, TProtocolFactory protocolFactory)
          Server with specified processor, server transport, and in/out protocol factory.
THsHaServer(TProcessor processor, TNonblockingServerTransport serverTransport, TProtocolFactory protocolFactory, THsHaServer.Options options)
          Server with specified processor, server transport, and in/out protocol factory.
 
Method Summary
 void serve()
          Begin accepting connections and processing invocations.
 
Methods inherited from class org.apache.thrift.server.TNonblockingServer
isStopped, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

THsHaServer

public THsHaServer(TProcessor processor,
                   TNonblockingServerTransport serverTransport)
Create server with given processor, and server transport. Default server options, TBinaryProtocol for the protocol, and TFramedTransport.Factory on both input and output transports. A TProcessorFactory will be created that always returns the specified processor.


THsHaServer

public THsHaServer(TProcessor processor,
                   TNonblockingServerTransport serverTransport,
                   THsHaServer.Options options)
Create server with given processor, server transport, and server options using TBinaryProtocol for the protocol, and TFramedTransport.Factory on both input and output transports. A TProcessorFactory will be created that always returns the specified processor.


THsHaServer

public THsHaServer(TProcessorFactory processorFactory,
                   TNonblockingServerTransport serverTransport)
Create server with specified processor factory and server transport. Uses default options. TBinaryProtocol is assumed. TFramedTransport.Factory is used on both input and output transports.


THsHaServer

public THsHaServer(TProcessorFactory processorFactory,
                   TNonblockingServerTransport serverTransport,
                   THsHaServer.Options options)
Create server with specified processor factory, server transport, and server options. TBinaryProtocol is assumed. TFramedTransport.Factory is used on both input and output transports.


THsHaServer

public THsHaServer(TProcessor processor,
                   TNonblockingServerTransport serverTransport,
                   TProtocolFactory protocolFactory)
Server with specified processor, server transport, and in/out protocol factory. Defaults will be used for in/out transport factory and server options.


THsHaServer

public THsHaServer(TProcessor processor,
                   TNonblockingServerTransport serverTransport,
                   TProtocolFactory protocolFactory,
                   THsHaServer.Options options)
Server with specified processor, server transport, and in/out protocol factory. Defaults will be used for in/out transport factory and server options.


THsHaServer

public THsHaServer(TProcessor processor,
                   TNonblockingServerTransport serverTransport,
                   TFramedTransport.Factory transportFactory,
                   TProtocolFactory protocolFactory)
Create server with specified processor, server transport, in/out transport factory, in/out protocol factory, and default server options. A processor factory will be created that always returns the specified processor.


THsHaServer

public THsHaServer(TProcessorFactory processorFactory,
                   TNonblockingServerTransport serverTransport,
                   TFramedTransport.Factory transportFactory,
                   TProtocolFactory protocolFactory)
Create server with specified processor factory, server transport, in/out transport factory, in/out protocol factory, and default server options.


THsHaServer

public THsHaServer(TProcessorFactory processorFactory,
                   TNonblockingServerTransport serverTransport,
                   TFramedTransport.Factory transportFactory,
                   TProtocolFactory protocolFactory,
                   THsHaServer.Options options)
Create server with specified processor factory, server transport, in/out transport factory, in/out protocol factory, and server options.


THsHaServer

public THsHaServer(TProcessor processor,
                   TNonblockingServerTransport serverTransport,
                   TFramedTransport.Factory outputTransportFactory,
                   TProtocolFactory inputProtocolFactory,
                   TProtocolFactory outputProtocolFactory)
Create server with everything specified, except use default server options.


THsHaServer

public THsHaServer(TProcessorFactory processorFactory,
                   TNonblockingServerTransport serverTransport,
                   TFramedTransport.Factory outputTransportFactory,
                   TProtocolFactory inputProtocolFactory,
                   TProtocolFactory outputProtocolFactory)
Create server with everything specified, except use default server options.


THsHaServer

public THsHaServer(TProcessorFactory processorFactory,
                   TNonblockingServerTransport serverTransport,
                   TFramedTransport.Factory outputTransportFactory,
                   TProtocolFactory inputProtocolFactory,
                   TProtocolFactory outputProtocolFactory,
                   THsHaServer.Options options)
Create server with every option fully specified, with an internally managed ExecutorService


THsHaServer

public THsHaServer(TProcessorFactory processorFactory,
                   TNonblockingServerTransport serverTransport,
                   TFramedTransport.Factory outputTransportFactory,
                   TProtocolFactory inputProtocolFactory,
                   TProtocolFactory outputProtocolFactory,
                   java.util.concurrent.ExecutorService executor,
                   TNonblockingServer.Options options)
Create server with every option fully specified, and with an injected ExecutorService

Method Detail

serve

public void serve()
Description copied from class: TNonblockingServer
Begin accepting connections and processing invocations.

Overrides:
serve in class TNonblockingServer


Copyright © 2010. All Rights Reserved.