Thrift TTransportFactory model for servers

Summary: Servers need to create bufferedtransports etc. around the transports they get in a user-definable way. So use a factory pattern to allow the user to supply an object to the server that defines this behavior.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664792 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TSimpleServer.h b/lib/cpp/src/server/TSimpleServer.h
index a8242d4..973ba30 100644
--- a/lib/cpp/src/server/TSimpleServer.h
+++ b/lib/cpp/src/server/TSimpleServer.h
@@ -1,5 +1,5 @@
-#ifndef T_SIMPLE_SERVER_H
-#define T_SIMPLE_SERVER_H
+#ifndef _THRIFT_SERVER_TSIMPLESERVER_H_
+#define _THRIFT_SERVER_TSIMPLESERVER_H_ 1
 
 #include "server/TServer.h"
 #include "transport/TServerTransport.h"
@@ -17,18 +17,17 @@
 class TSimpleServer : public TServer {
  public:
   TSimpleServer(shared_ptr<TProcessor> processor,
-                shared_ptr<TServerOptions> options,
-                shared_ptr<TServerTransport> serverTransport) :
-    TServer(processor, options), serverTransport_(serverTransport) {}
+                shared_ptr<TServerTransport> serverTransport,
+                shared_ptr<TTransportFactory> transportFactory,
+                shared_ptr<TServerOptions> options) :
+    TServer(processor, serverTransport, transportFactory, options) {}
     
   ~TSimpleServer() {}
 
   void run();
 
- protected:
-  shared_ptr<TServerTransport> serverTransport_;
 };
 
 }}} // facebook::thrift::server
 
-#endif
+#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_