(void) tservice;
// Open class
indent(f_service_) <<
- "private static class " << tfunction->get_name() << "<I extends Iface> extends org.apache.thrift.ProcessFunction<I, " << argsname << "> {" << endl;
+ "public static class " << tfunction->get_name() << "<I extends Iface> extends org.apache.thrift.ProcessFunction<I, " << argsname << "> {" << endl;
indent_up();
indent(f_service_) << "public " << tfunction->get_name() << "() {" << endl;
indent(f_service_) << " super(\"" << tfunction->get_name() << "\");" << endl;
indent(f_service_) << "}" << endl << endl;
- indent(f_service_) << "protected " << argsname << " getEmptyArgsInstance() {" << endl;
+ indent(f_service_) << "public " << argsname << " getEmptyArgsInstance() {" << endl;
indent(f_service_) << " return new " << argsname << "();" << endl;
indent(f_service_) << "}" << endl << endl;
- indent(f_service_) << "protected " << resultname << " getResult(I iface, " << argsname << " args) throws org.apache.thrift.TException {" << endl;
+ indent(f_service_) << "public " << resultname << " getResult(I iface, " << argsname << " args) throws org.apache.thrift.TException {" << endl;
indent_up();
if (!tfunction->is_oneway()) {
indent(f_service_) << resultname << " result = new " << resultname << "();" << endl;
oprot.getTransport().flush();
}
- protected abstract TBase getResult(I iface, T args) throws TException;
+ public abstract TBase getResult(I iface, T args) throws TException;
- protected abstract T getEmptyArgsInstance();
+ public abstract T getEmptyArgsInstance();
public String getMethodName() {
return methodName;
}
-}
\ No newline at end of file
+}
package org.apache.thrift;
+import java.util.Collections;
import java.util.Map;
import org.apache.thrift.protocol.TMessage;
this.processMap = processFunctionMap;
}
+ public Map<String,ProcessFunction<I, ? extends TBase>> getProcessMapView() {
+ return Collections.unmodifiableMap(processMap);
+ }
+
@Override
public boolean process(TProtocol in, TProtocol out) throws TException {
TMessage msg = in.readMessageBegin();