More boosification of thrift driver, server, transport and protocol code
Modified TestServer to use thread-pool manager
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664737 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TThreadPoolServer.h b/lib/cpp/src/server/TThreadPoolServer.h
index ef63a37..827491d 100644
--- a/lib/cpp/src/server/TThreadPoolServer.h
+++ b/lib/cpp/src/server/TThreadPoolServer.h
@@ -1,10 +1,39 @@
#ifndef T_THREADPOOL_SERVER_H
#define T_THREADPOOL_SERVER_H
-#include "server/TServer.h"
-#include "transport/TServerTransport.h"
+#include <concurrency/ThreadManager.h>
+#include <server/TServer.h>
+#include <transport/TServerTransport.h>
+
+#include <boost/shared_ptr.hpp>
namespace facebook { namespace thrift { namespace server {
+
+using namespace facebook::thrift::concurrency;
+using namespace facebook::thrift::transport;
+using namespace boost;
+
+class TThreadPoolServer : public TServer {
+public:
+
+ class Task;
+
+ TThreadPoolServer(shared_ptr<TProcessor> processor,
+ shared_ptr<TServerOptions> options,
+ shared_ptr<TServerTransport> serverTransport,
+ shared_ptr<ThreadManager> threadManager);
+
+ virtual ~TThreadPoolServer();
+
+ virtual void run();
+
+protected:
+
+ shared_ptr<TServerTransport> serverTransport_;
+ shared_ptr<ThreadManager> threadManager_;
+
+};
+
}}} // facebook::thrift::server
#endif