Thrift: generate Processors not Servers

Summary: Because the gen'd code isn't actually a server

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664794 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/src/TestServer.cc b/test/cpp/src/TestServer.cc
index f743aea..f2f9eca 100644
--- a/test/cpp/src/TestServer.cc
+++ b/test/cpp/src/TestServer.cc
@@ -332,7 +332,7 @@
 
   shared_ptr<TestHandler> testHandler(new TestHandler());
 
-  shared_ptr<ThriftTestServer> testServer(new ThriftTestServer(testHandler, binaryProtocol));
+  shared_ptr<ThriftTestProcessor> testProcessor(new ThriftTestProcessor(testHandler, binaryProtocol));
 
   // Transport
   shared_ptr<TServerSocket> serverSocket(new TServerSocket(port));
@@ -346,7 +346,7 @@
   if (serverType == "simple") {
 
     // Server
-    TSimpleServer simpleServer(testServer,
+    TSimpleServer simpleServer(testProcessor,
 			       serverSocket,
                                transportFactory,
 			       serverOptions
@@ -367,7 +367,7 @@
 
     threadManager->start();
 
-    TThreadPoolServer threadPoolServer(testServer,
+    TThreadPoolServer threadPoolServer(testProcessor,
 				       serverSocket,
                                        transportFactory,
 				       threadManager,
diff --git a/test/java/src/TestServer.java b/test/java/src/TestServer.java
index b527777..ab8603a 100644
--- a/test/java/src/TestServer.java
+++ b/test/java/src/TestServer.java
@@ -241,8 +241,8 @@
         new TBinaryProtocol();
       TestHandler testHandler =
         new TestHandler();
-      ThriftTest.Server testServer =
-        new ThriftTest.Server(testHandler, binaryProtocol);
+      ThriftTest.Processor testProcessor =
+        new ThriftTest.Processor(testHandler, binaryProtocol);
 
       // Transport
       TServerSocket tServerSocket =
@@ -251,10 +251,10 @@
       TServer serverEngine;
 
       // Simple Server
-      // serverEngine = new TSimpleServer(testServer, tServerSocket);
+      // serverEngine = new TSimpleServer(testProcessor, tServerSocket);
 
       // ThreadPool Server
-      serverEngine =  new TThreadPoolServer(testServer, tServerSocket);
+      serverEngine =  new TThreadPoolServer(testProcessor, tServerSocket);
 
       // Run it
       System.out.println("Starting the server on port " + port + "...");
diff --git a/test/php/TestClient.php b/test/php/TestClient.php
index a92adcc..27a66ea 100644
--- a/test/php/TestClient.php
+++ b/test/php/TestClient.php
@@ -7,8 +7,11 @@
   $MODE = 'normal';
 }
 
+/** Set the Thrift root */
+$GLOBALS['THRIFT_ROOT'] = '../../lib/php/src';
+
 /** Include the Thrift base */
-require_once '/home/mcslee/code/projects/thrift/lib/php/src/Thrift.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
 
 /** Include the binary protocol */
 require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
diff --git a/test/py/TestServer.py b/test/py/TestServer.py
index db2ad81..f0f9ba1 100755
--- a/test/py/TestServer.py
+++ b/test/py/TestServer.py
@@ -54,7 +54,7 @@
 transport = TSocket.TServerSocket(9090)
 protocol = TBinaryProtocol.TBinaryProtocol()
 handler = TestHandler()
-iface = ThriftTest.Server(handler, protocol)
+processor = ThriftTest.Processor(handler, protocol)
 factory = TTransport.TBufferedTransportFactory()
-server = TServer.TSimpleServer(iface, transport, factory)
+server = TServer.TSimpleServer(processor, transport, factory)
 server.run()