Getters for input/output protocol in client lib
Summary: Why not, nice to have. From Ted Dziuba.
Reviewed By: dreiss
Test Plan: Build Java compiler.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665471 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc
index 52166bf..0440222 100644
--- a/compiler/cpp/src/generate/t_java_generator.cc
+++ b/compiler/cpp/src/generate/t_java_generator.cc
@@ -972,6 +972,23 @@
endl <<
indent() << "protected int seqid_;" << endl <<
endl;
+
+ indent(f_service_) <<
+ "public TProtocol getInputProtocol()" << endl;
+ scope_up(f_service_);
+ indent(f_service_) <<
+ "return this.iprot_;" << endl;
+ scope_down(f_service_);
+ f_service_ << endl;
+
+ indent(f_service_) <<
+ "public TProtocol getOutputProtocol()" << endl;
+ scope_up(f_service_);
+ indent(f_service_) <<
+ "return this.oprot_;" << endl;
+ scope_down(f_service_);
+ f_service_ << endl;
+
}
// Generate client method implementations