Thrift: Change Java/C++ server generation
Summary: Servers shouldn't implement iface directly, instead should contain an iface object
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664785 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/src/TestServer.cc b/test/cpp/src/TestServer.cc
index 75b88d4..63a7594 100644
--- a/test/cpp/src/TestServer.cc
+++ b/test/cpp/src/TestServer.cc
@@ -19,10 +19,9 @@
using namespace thrift::test;
-class TestServer : public ThriftTestServer {
+class TestHandler : public ThriftTestIf {
public:
- TestServer(shared_ptr<TProtocol> protocol) :
- ThriftTestServer(protocol) {}
+ TestHandler() {}
void testVoid() {
printf("testVoid()\n");
@@ -339,7 +338,9 @@
// Dispatcher
shared_ptr<TBinaryProtocol> binaryProtocol(new TBinaryProtocol);
- shared_ptr<TestServer> testServer(new TestServer(binaryProtocol));
+ shared_ptr<TestHandler> testHandler(new TestHandler());
+
+ shared_ptr<ThriftTestServer> testServer(new ThriftTestServer(testHandler, binaryProtocol));
// Options
shared_ptr<TServerOptions> serverOptions(new TServerOptions());