summaryrefslogtreecommitdiff
path: root/lib/cpp/src/thrift/server/TSimpleServer.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cpp/src/thrift/server/TSimpleServer.h')
-rw-r--r--lib/cpp/src/thrift/server/TSimpleServer.h103
1 files changed, 52 insertions, 51 deletions
diff --git a/lib/cpp/src/thrift/server/TSimpleServer.h b/lib/cpp/src/thrift/server/TSimpleServer.h
index f9e0e2b05..967f83421 100644
--- a/lib/cpp/src/thrift/server/TSimpleServer.h
+++ b/lib/cpp/src/thrift/server/TSimpleServer.h
@@ -23,7 +23,9 @@
#include <thrift/server/TServer.h>
#include <thrift/transport/TServerTransport.h>
-namespace apache { namespace thrift { namespace server {
+namespace apache {
+namespace thrift {
+namespace server {
/**
* This is the most basic simple server. It is single-threaded and runs a
@@ -33,55 +35,54 @@ namespace apache { namespace thrift { namespace server {
*
*/
class TSimpleServer : public TServer {
- public:
- template<typename ProcessorFactory>
- TSimpleServer(
- const boost::shared_ptr<ProcessorFactory>& processorFactory,
- const boost::shared_ptr<TServerTransport>& serverTransport,
- const boost::shared_ptr<TTransportFactory>& transportFactory,
- const boost::shared_ptr<TProtocolFactory>& protocolFactory,
- THRIFT_OVERLOAD_IF(ProcessorFactory, TProcessorFactory)) :
- TServer(processorFactory, serverTransport, transportFactory,
- protocolFactory),
- stop_(false) {}
+public:
+ template <typename ProcessorFactory>
+ TSimpleServer(const boost::shared_ptr<ProcessorFactory>& processorFactory,
+ const boost::shared_ptr<TServerTransport>& serverTransport,
+ const boost::shared_ptr<TTransportFactory>& transportFactory,
+ const boost::shared_ptr<TProtocolFactory>& protocolFactory,
+ THRIFT_OVERLOAD_IF(ProcessorFactory, TProcessorFactory))
+ : TServer(processorFactory, serverTransport, transportFactory, protocolFactory), stop_(false) {}
- template<typename Processor>
- TSimpleServer(
- const boost::shared_ptr<Processor>& processor,
- const boost::shared_ptr<TServerTransport>& serverTransport,
- const boost::shared_ptr<TTransportFactory>& transportFactory,
- const boost::shared_ptr<TProtocolFactory>& protocolFactory,
- THRIFT_OVERLOAD_IF(Processor, TProcessor)) :
- TServer(processor, serverTransport, transportFactory, protocolFactory),
- stop_(false) {}
+ template <typename Processor>
+ TSimpleServer(const boost::shared_ptr<Processor>& processor,
+ const boost::shared_ptr<TServerTransport>& serverTransport,
+ const boost::shared_ptr<TTransportFactory>& transportFactory,
+ const boost::shared_ptr<TProtocolFactory>& protocolFactory,
+ THRIFT_OVERLOAD_IF(Processor, TProcessor))
+ : TServer(processor, serverTransport, transportFactory, protocolFactory), stop_(false) {}
- template<typename ProcessorFactory>
- TSimpleServer(
- const boost::shared_ptr<ProcessorFactory>& processorFactory,
- const boost::shared_ptr<TServerTransport>& serverTransport,
- const boost::shared_ptr<TTransportFactory>& inputTransportFactory,
- const boost::shared_ptr<TTransportFactory>& outputTransportFactory,
- const boost::shared_ptr<TProtocolFactory>& inputProtocolFactory,
- const boost::shared_ptr<TProtocolFactory>& outputProtocolFactory,
- THRIFT_OVERLOAD_IF(ProcessorFactory, TProcessorFactory)) :
- TServer(processorFactory, serverTransport,
- inputTransportFactory, outputTransportFactory,
- inputProtocolFactory, outputProtocolFactory),
- stop_(false) {}
+ template <typename ProcessorFactory>
+ TSimpleServer(const boost::shared_ptr<ProcessorFactory>& processorFactory,
+ const boost::shared_ptr<TServerTransport>& serverTransport,
+ const boost::shared_ptr<TTransportFactory>& inputTransportFactory,
+ const boost::shared_ptr<TTransportFactory>& outputTransportFactory,
+ const boost::shared_ptr<TProtocolFactory>& inputProtocolFactory,
+ const boost::shared_ptr<TProtocolFactory>& outputProtocolFactory,
+ THRIFT_OVERLOAD_IF(ProcessorFactory, TProcessorFactory))
+ : TServer(processorFactory,
+ serverTransport,
+ inputTransportFactory,
+ outputTransportFactory,
+ inputProtocolFactory,
+ outputProtocolFactory),
+ stop_(false) {}
- template<typename Processor>
- TSimpleServer(
- const boost::shared_ptr<Processor>& processor,
- const boost::shared_ptr<TServerTransport>& serverTransport,
- const boost::shared_ptr<TTransportFactory>& inputTransportFactory,
- const boost::shared_ptr<TTransportFactory>& outputTransportFactory,
- const boost::shared_ptr<TProtocolFactory>& inputProtocolFactory,
- const boost::shared_ptr<TProtocolFactory>& outputProtocolFactory,
- THRIFT_OVERLOAD_IF(Processor, TProcessor)) :
- TServer(processor, serverTransport,
- inputTransportFactory, outputTransportFactory,
- inputProtocolFactory, outputProtocolFactory),
- stop_(false) {}
+ template <typename Processor>
+ TSimpleServer(const boost::shared_ptr<Processor>& processor,
+ const boost::shared_ptr<TServerTransport>& serverTransport,
+ const boost::shared_ptr<TTransportFactory>& inputTransportFactory,
+ const boost::shared_ptr<TTransportFactory>& outputTransportFactory,
+ const boost::shared_ptr<TProtocolFactory>& inputProtocolFactory,
+ const boost::shared_ptr<TProtocolFactory>& outputProtocolFactory,
+ THRIFT_OVERLOAD_IF(Processor, TProcessor))
+ : TServer(processor,
+ serverTransport,
+ inputTransportFactory,
+ outputTransportFactory,
+ inputProtocolFactory,
+ outputProtocolFactory),
+ stop_(false) {}
~TSimpleServer() {}
@@ -92,11 +93,11 @@ class TSimpleServer : public TServer {
serverTransport_->interrupt();
}
- protected:
+protected:
bool stop_;
-
};
-
-}}} // apache::thrift::server
+}
+}
+} // apache::thrift::server
#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_