\Thrift\ServerTSimpleServer

Simple implemtation of a Thrift server.

Summary

Methods
Properties
Constants
__construct()
serve()
stop()
No public properties found
No constants found
No protected methods found
$processor_
$transport_
$inputTransportFactory_
$outputTransportFactory_
$inputProtocolFactory_
$outputProtocolFactory_
N/A
No private methods found
$stop_
N/A

Properties

$processor_

$processor_ : \Thrift\Server\TProcessor

Processor to handle new clients

Type

\Thrift\Server\TProcessor

$transport_

$transport_ : \Thrift\Server\TServerTransport

Server transport to be used for listening and accepting new clients

Type

\Thrift\Server\TServerTransport

$stop_

$stop_ : boolean

Flag for the main serving loop

Type

boolean

Methods

__construct()

__construct(object  $processor, \Thrift\Server\TServerTransport  $transport, \Thrift\Factory\TTransportFactory  $inputTransportFactory, \Thrift\Factory\TTransportFactory  $outputTransportFactory, \Thrift\Factory\TProtocolFactory  $inputProtocolFactory, \Thrift\Factory\TProtocolFactory  $outputProtocolFactory) : void

Sets up all the factories, etc

Parameters

object $processor
\Thrift\Server\TServerTransport $transport
\Thrift\Factory\TTransportFactory $inputTransportFactory
\Thrift\Factory\TTransportFactory $outputTransportFactory
\Thrift\Factory\TProtocolFactory $inputProtocolFactory
\Thrift\Factory\TProtocolFactory $outputProtocolFactory

serve()

serve() : void

Listens for new client using the supplied transport. It handles TTransportExceptions to avoid timeouts etc killing it

stop()

stop() : void

Stops the server running. Kills the transport and then stops the main serving loop