/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; import java.util.Collections; import java.util.BitSet; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.facebook.thrift.*; import com.facebook.thrift.annotations.*; import com.facebook.thrift.async.*; import com.facebook.thrift.meta_data.*; import com.facebook.thrift.server.*; import com.facebook.thrift.transport.*; import com.facebook.thrift.protocol.*; @SuppressWarnings({ "unused", "serial" }) public class MyService { public interface Iface { public void ping() throws MyException, TException; public String getRandomData() throws TException; public Boolean hasDataById(Long id) throws TException; public String getDataById(Long id) throws TException; public void putDataById(Long id, String data) throws TException; public void lobDataById(Long id, String data) throws TException; public void doNothing() throws TException; } public interface AsyncIface { public void ping(AsyncMethodCallback resultHandler) throws TException; public void getRandomData(AsyncMethodCallback resultHandler) throws TException; public void hasDataById(Long id, AsyncMethodCallback resultHandler) throws TException; public void getDataById(Long id, AsyncMethodCallback resultHandler) throws TException; public void putDataById(Long id, String data, AsyncMethodCallback resultHandler) throws TException; public void lobDataById(Long id, String data, AsyncMethodCallback resultHandler) throws TException; public void doNothing(AsyncMethodCallback resultHandler) throws TException; } public static class Client extends EventHandlerBase implements Iface, TClientIf { public Client(TProtocol prot) { this(prot, prot); } public Client(TProtocol iprot, TProtocol oprot) { iprot_ = iprot; oprot_ = oprot; } protected TProtocol iprot_; protected TProtocol oprot_; protected int seqid_; @Override public TProtocol getInputProtocol() { return this.iprot_; } @Override public TProtocol getOutputProtocol() { return this.oprot_; } public void ping() throws MyException, TException { ContextStack ctx = getContextStack("MyService.ping", null); this.setContextStack(ctx); send_ping(); recv_ping(); } public void send_ping() throws TException { ContextStack ctx = this.getContextStack(); super.preWrite(ctx, "MyService.ping", null); oprot_.writeMessageBegin(new TMessage("ping", TMessageType.CALL, seqid_)); ping_args args = new ping_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); super.postWrite(ctx, "MyService.ping", args); return; } public void recv_ping() throws MyException, TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; super.preRead(ctx, "MyService.ping"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } ping_result result = ping_result.deserialize(iprot_); iprot_.readMessageEnd(); super.postRead(ctx, "MyService.ping", result); if (result.myExcept != null) { throw result.myExcept; } return; } public String getRandomData() throws TException { ContextStack ctx = getContextStack("MyService.getRandomData", null); this.setContextStack(ctx); send_getRandomData(); return recv_getRandomData(); } public void send_getRandomData() throws TException { ContextStack ctx = this.getContextStack(); super.preWrite(ctx, "MyService.getRandomData", null); oprot_.writeMessageBegin(new TMessage("getRandomData", TMessageType.CALL, seqid_)); getRandomData_args args = new getRandomData_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); super.postWrite(ctx, "MyService.getRandomData", args); return; } public String recv_getRandomData() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; super.preRead(ctx, "MyService.getRandomData"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } getRandomData_result result = getRandomData_result.deserialize(iprot_); iprot_.readMessageEnd(); super.postRead(ctx, "MyService.getRandomData", result); if (result.isSetSuccess()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRandomData failed: unknown result"); } public Boolean hasDataById(Long id) throws TException { ContextStack ctx = getContextStack("MyService.hasDataById", null); this.setContextStack(ctx); send_hasDataById(id); return recv_hasDataById(); } public void send_hasDataById(Long id) throws TException { ContextStack ctx = this.getContextStack(); super.preWrite(ctx, "MyService.hasDataById", null); oprot_.writeMessageBegin(new TMessage("hasDataById", TMessageType.CALL, seqid_)); hasDataById_args args = new hasDataById_args(); args.id = id; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); super.postWrite(ctx, "MyService.hasDataById", args); return; } public Boolean recv_hasDataById() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; super.preRead(ctx, "MyService.hasDataById"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } hasDataById_result result = hasDataById_result.deserialize(iprot_); iprot_.readMessageEnd(); super.postRead(ctx, "MyService.hasDataById", result); if (result.isSetSuccess()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "hasDataById failed: unknown result"); } public String getDataById(Long id) throws TException { ContextStack ctx = getContextStack("MyService.getDataById", null); this.setContextStack(ctx); send_getDataById(id); return recv_getDataById(); } public void send_getDataById(Long id) throws TException { ContextStack ctx = this.getContextStack(); super.preWrite(ctx, "MyService.getDataById", null); oprot_.writeMessageBegin(new TMessage("getDataById", TMessageType.CALL, seqid_)); getDataById_args args = new getDataById_args(); args.id = id; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); super.postWrite(ctx, "MyService.getDataById", args); return; } public String recv_getDataById() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; super.preRead(ctx, "MyService.getDataById"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } getDataById_result result = getDataById_result.deserialize(iprot_); iprot_.readMessageEnd(); super.postRead(ctx, "MyService.getDataById", result); if (result.isSetSuccess()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDataById failed: unknown result"); } public void putDataById(Long id, String data) throws TException { ContextStack ctx = getContextStack("MyService.putDataById", null); this.setContextStack(ctx); send_putDataById(id, data); recv_putDataById(); } public void send_putDataById(Long id, String data) throws TException { ContextStack ctx = this.getContextStack(); super.preWrite(ctx, "MyService.putDataById", null); oprot_.writeMessageBegin(new TMessage("putDataById", TMessageType.CALL, seqid_)); putDataById_args args = new putDataById_args(); args.id = id; args.data = data; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); super.postWrite(ctx, "MyService.putDataById", args); return; } public void recv_putDataById() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; super.preRead(ctx, "MyService.putDataById"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } putDataById_result result = putDataById_result.deserialize(iprot_); iprot_.readMessageEnd(); super.postRead(ctx, "MyService.putDataById", result); return; } public void lobDataById(Long id, String data) throws TException { ContextStack ctx = getContextStack("MyService.lobDataById", null); this.setContextStack(ctx); send_lobDataById(id, data); } public void send_lobDataById(Long id, String data) throws TException { ContextStack ctx = this.getContextStack(); super.preWrite(ctx, "MyService.lobDataById", null); oprot_.writeMessageBegin(new TMessage("lobDataById", TMessageType.CALL, seqid_)); lobDataById_args args = new lobDataById_args(); args.id = id; args.data = data; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().onewayFlush(); super.postWrite(ctx, "MyService.lobDataById", args); return; } public void doNothing() throws TException { ContextStack ctx = getContextStack("MyService.doNothing", null); this.setContextStack(ctx); send_doNothing(); recv_doNothing(); } public void send_doNothing() throws TException { ContextStack ctx = this.getContextStack(); super.preWrite(ctx, "MyService.doNothing", null); oprot_.writeMessageBegin(new TMessage("doNothing", TMessageType.CALL, seqid_)); doNothing_args args = new doNothing_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); super.postWrite(ctx, "MyService.doNothing", args); return; } public void recv_doNothing() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; super.preRead(ctx, "MyService.doNothing"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } doNothing_result result = doNothing_result.deserialize(iprot_); iprot_.readMessageEnd(); super.postRead(ctx, "MyService.doNothing", result); return; } } public static class AsyncClient extends TAsyncClient implements AsyncIface { public static class Factory implements TAsyncClientFactory { private TAsyncClientManager clientManager; private TProtocolFactory protocolFactory; public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void ping(AsyncMethodCallback resultHandler14) throws TException { checkReady(); ping_call method_call = new ping_call(resultHandler14, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class ping_call extends TAsyncMethodCall { public ping_call(AsyncMethodCallback resultHandler15, TAsyncClient client11, TProtocolFactory protocolFactory12, TNonblockingTransport transport13) throws TException { super(client11, protocolFactory12, transport13, resultHandler15, false); } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("ping", TMessageType.CALL, 0)); ping_args args = new ping_args(); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws MyException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_ping(); } } public void getRandomData(AsyncMethodCallback resultHandler19) throws TException { checkReady(); getRandomData_call method_call = new getRandomData_call(resultHandler19, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getRandomData_call extends TAsyncMethodCall { public getRandomData_call(AsyncMethodCallback resultHandler20, TAsyncClient client16, TProtocolFactory protocolFactory17, TNonblockingTransport transport18) throws TException { super(client16, protocolFactory17, transport18, resultHandler20, false); } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("getRandomData", TMessageType.CALL, 0)); getRandomData_args args = new getRandomData_args(); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getRandomData(); } } public void hasDataById(Long id, AsyncMethodCallback resultHandler24) throws TException { checkReady(); hasDataById_call method_call = new hasDataById_call(id, resultHandler24, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class hasDataById_call extends TAsyncMethodCall { private Long id; public hasDataById_call(Long id, AsyncMethodCallback resultHandler25, TAsyncClient client21, TProtocolFactory protocolFactory22, TNonblockingTransport transport23) throws TException { super(client21, protocolFactory22, transport23, resultHandler25, false); this.id = id; } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("hasDataById", TMessageType.CALL, 0)); hasDataById_args args = new hasDataById_args(); args.setId(id); args.write(prot); prot.writeMessageEnd(); } public Boolean getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_hasDataById(); } } public void getDataById(Long id, AsyncMethodCallback resultHandler29) throws TException { checkReady(); getDataById_call method_call = new getDataById_call(id, resultHandler29, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getDataById_call extends TAsyncMethodCall { private Long id; public getDataById_call(Long id, AsyncMethodCallback resultHandler30, TAsyncClient client26, TProtocolFactory protocolFactory27, TNonblockingTransport transport28) throws TException { super(client26, protocolFactory27, transport28, resultHandler30, false); this.id = id; } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("getDataById", TMessageType.CALL, 0)); getDataById_args args = new getDataById_args(); args.setId(id); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getDataById(); } } public void putDataById(Long id, String data, AsyncMethodCallback resultHandler34) throws TException { checkReady(); putDataById_call method_call = new putDataById_call(id, data, resultHandler34, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class putDataById_call extends TAsyncMethodCall { private Long id; private String data; public putDataById_call(Long id, String data, AsyncMethodCallback resultHandler35, TAsyncClient client31, TProtocolFactory protocolFactory32, TNonblockingTransport transport33) throws TException { super(client31, protocolFactory32, transport33, resultHandler35, false); this.id = id; this.data = data; } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("putDataById", TMessageType.CALL, 0)); putDataById_args args = new putDataById_args(); args.setId(id); args.setData(data); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_putDataById(); } } public void lobDataById(Long id, String data, AsyncMethodCallback resultHandler39) throws TException { checkReady(); lobDataById_call method_call = new lobDataById_call(id, data, resultHandler39, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lobDataById_call extends TAsyncMethodCall { private Long id; private String data; public lobDataById_call(Long id, String data, AsyncMethodCallback resultHandler40, TAsyncClient client36, TProtocolFactory protocolFactory37, TNonblockingTransport transport38) throws TException { super(client36, protocolFactory37, transport38, resultHandler40, true); this.id = id; this.data = data; } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("lobDataById", TMessageType.CALL, 0)); lobDataById_args args = new lobDataById_args(); args.setId(id); args.setData(data); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); } } public void doNothing(AsyncMethodCallback resultHandler44) throws TException { checkReady(); doNothing_call method_call = new doNothing_call(resultHandler44, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class doNothing_call extends TAsyncMethodCall { public doNothing_call(AsyncMethodCallback resultHandler45, TAsyncClient client41, TProtocolFactory protocolFactory42, TNonblockingTransport transport43) throws TException { super(client41, protocolFactory42, transport43, resultHandler45, false); } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("doNothing", TMessageType.CALL, 0)); doNothing_args args = new doNothing_args(); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_doNothing(); } } } public static class Processor implements TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(Iface iface) { iface_ = iface; event_handler_ = new TProcessorEventHandler(); // Empty handler processMap_.put("ping", new ping()); processMap_.put("getRandomData", new getRandomData()); processMap_.put("hasDataById", new hasDataById()); processMap_.put("getDataById", new getDataById()); processMap_.put("putDataById", new putDataById()); processMap_.put("lobDataById", new lobDataById()); processMap_.put("doNothing", new doNothing()); } protected static interface ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException; } public void setEventHandler(TProcessorEventHandler handler) { this.event_handler_ = handler; } private Iface iface_; protected TProcessorEventHandler event_handler_; protected final HashMap processMap_ = new HashMap(); public boolean process(TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { TMessage msg = iprot.readMessageBegin(); ProcessFunction fn = processMap_.get(msg.name); if (fn == null) { TProtocolUtil.skip(iprot, TType.STRUCT); iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return true; } fn.process(msg.seqid, iprot, oprot, server_ctx); return true; } private class ping implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { Object handler_ctx = event_handler_.getContext("MyService.ping", server_ctx); ping_args args = new ping_args(); event_handler_.preRead(handler_ctx, "MyService.ping"); args.read(iprot); iprot.readMessageEnd(); event_handler_.postRead(handler_ctx, "MyService.ping", args); ping_result result = new ping_result(); try { iface_.ping(); } catch (MyException myExcept) { result.myExcept = myExcept; event_handler_.declaredUserException(handler_ctx, "MyService.ping", myExcept); } catch (Throwable th) { LOGGER.error("Internal error processing MyService.ping", th); event_handler_.handlerError(handler_ctx, "MyService.ping", th); TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing MyService.ping"); event_handler_.preWrite(handler_ctx, "MyService.ping", null); oprot.writeMessageBegin(new TMessage("MyService.ping", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); event_handler_.postWrite(handler_ctx, "MyService.ping", null); return; } event_handler_.preWrite(handler_ctx, "MyService.ping", result); oprot.writeMessageBegin(new TMessage("ping", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); event_handler_.postWrite(handler_ctx, "MyService.ping", result); } } private class getRandomData implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { Object handler_ctx = event_handler_.getContext("MyService.getRandomData", server_ctx); getRandomData_args args = new getRandomData_args(); event_handler_.preRead(handler_ctx, "MyService.getRandomData"); args.read(iprot); iprot.readMessageEnd(); event_handler_.postRead(handler_ctx, "MyService.getRandomData", args); getRandomData_result result = new getRandomData_result(); result.success = iface_.getRandomData(); event_handler_.preWrite(handler_ctx, "MyService.getRandomData", result); oprot.writeMessageBegin(new TMessage("getRandomData", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); event_handler_.postWrite(handler_ctx, "MyService.getRandomData", result); } } private class hasDataById implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { Object handler_ctx = event_handler_.getContext("MyService.hasDataById", server_ctx); hasDataById_args args = new hasDataById_args(); event_handler_.preRead(handler_ctx, "MyService.hasDataById"); args.read(iprot); iprot.readMessageEnd(); event_handler_.postRead(handler_ctx, "MyService.hasDataById", args); hasDataById_result result = new hasDataById_result(); result.success = iface_.hasDataById(args.id); event_handler_.preWrite(handler_ctx, "MyService.hasDataById", result); oprot.writeMessageBegin(new TMessage("hasDataById", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); event_handler_.postWrite(handler_ctx, "MyService.hasDataById", result); } } private class getDataById implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { Object handler_ctx = event_handler_.getContext("MyService.getDataById", server_ctx); getDataById_args args = new getDataById_args(); event_handler_.preRead(handler_ctx, "MyService.getDataById"); args.read(iprot); iprot.readMessageEnd(); event_handler_.postRead(handler_ctx, "MyService.getDataById", args); getDataById_result result = new getDataById_result(); result.success = iface_.getDataById(args.id); event_handler_.preWrite(handler_ctx, "MyService.getDataById", result); oprot.writeMessageBegin(new TMessage("getDataById", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); event_handler_.postWrite(handler_ctx, "MyService.getDataById", result); } } private class putDataById implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { Object handler_ctx = event_handler_.getContext("MyService.putDataById", server_ctx); putDataById_args args = new putDataById_args(); event_handler_.preRead(handler_ctx, "MyService.putDataById"); args.read(iprot); iprot.readMessageEnd(); event_handler_.postRead(handler_ctx, "MyService.putDataById", args); putDataById_result result = new putDataById_result(); iface_.putDataById(args.id, args.data); event_handler_.preWrite(handler_ctx, "MyService.putDataById", result); oprot.writeMessageBegin(new TMessage("putDataById", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); event_handler_.postWrite(handler_ctx, "MyService.putDataById", result); } } private class lobDataById implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { Object handler_ctx = event_handler_.getContext("MyService.lobDataById", server_ctx); lobDataById_args args = new lobDataById_args(); event_handler_.preRead(handler_ctx, "MyService.lobDataById"); args.read(iprot); iprot.readMessageEnd(); event_handler_.postRead(handler_ctx, "MyService.lobDataById", args); iface_.lobDataById(args.id, args.data); return; } } private class doNothing implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { Object handler_ctx = event_handler_.getContext("MyService.doNothing", server_ctx); doNothing_args args = new doNothing_args(); event_handler_.preRead(handler_ctx, "MyService.doNothing"); args.read(iprot); iprot.readMessageEnd(); event_handler_.postRead(handler_ctx, "MyService.doNothing", args); doNothing_result result = new doNothing_result(); iface_.doNothing(); event_handler_.preWrite(handler_ctx, "MyService.doNothing", result); oprot.writeMessageBegin(new TMessage("doNothing", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); event_handler_.postWrite(handler_ctx, "MyService.doNothing", result); } } } public static class ping_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("ping_args"); public ping_args() { } /** * Performs a deep copy on other. */ public ping_args(ping_args other) { } public ping_args deepCopy() { return new ping_args(this); } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof ping_args)) return false; ping_args that = (ping_args)_that; return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static ping_args deserialize(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); ping_args _that; _that = new ping_args( ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class ping_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("ping_result"); private static final TField MY_EXCEPT_FIELD_DESC = new TField("myExcept", TType.STRUCT, (short)1); public MyException myExcept; public static final int MYEXCEPT = 1; // isset id assignments public ping_result() { } public ping_result( MyException myExcept) { this.myExcept = myExcept; } /** * Performs a deep copy on other. */ public ping_result(ping_result other) { if (other.isSetMyExcept()) { this.myExcept = TBaseHelper.deepCopy(other.myExcept); } } public ping_result deepCopy() { return new ping_result(this); } public MyException getMyExcept() { return this.myExcept; } public ping_result setMyExcept(MyException myExcept) { this.myExcept = myExcept; return this; } public void unsetMyExcept() { this.myExcept = null; } // Returns true if field myExcept is set (has been assigned a value) and false otherwise public boolean isSetMyExcept() { return this.myExcept != null; } public void setMyExceptIsSet(boolean __value) { if (!__value) { this.myExcept = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof ping_result)) return false; ping_result that = (ping_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetMyExcept(), that.isSetMyExcept(), this.myExcept, that.myExcept)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {myExcept}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static ping_result deserialize(TProtocol iprot) throws TException { MyException tmp_myExcept = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case MYEXCEPT: if (__field.type == TType.STRUCT) { tmp_myExcept = MyException.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); ping_result _that; _that = new ping_result( tmp_myExcept ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetMyExcept()) { oprot.writeFieldBegin(MY_EXCEPT_FIELD_DESC); this.myExcept.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class getRandomData_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRandomData_args"); public getRandomData_args() { } /** * Performs a deep copy on other. */ public getRandomData_args(getRandomData_args other) { } public getRandomData_args deepCopy() { return new getRandomData_args(this); } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof getRandomData_args)) return false; getRandomData_args that = (getRandomData_args)_that; return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static getRandomData_args deserialize(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); getRandomData_args _that; _that = new getRandomData_args( ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class getRandomData_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRandomData_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); public String success; public static final int SUCCESS = 0; // isset id assignments public getRandomData_result() { } public getRandomData_result( String success) { this.success = success; } /** * Performs a deep copy on other. */ public getRandomData_result(getRandomData_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } public getRandomData_result deepCopy() { return new getRandomData_result(this); } public String getSuccess() { return this.success; } public getRandomData_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been assigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean __value) { if (!__value) { this.success = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof getRandomData_result)) return false; getRandomData_result that = (getRandomData_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {success}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static getRandomData_result deserialize(TProtocol iprot) throws TException { String tmp_success = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case SUCCESS: if (__field.type == TType.STRING) { tmp_success = iprot.readString(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); getRandomData_result _that; _that = new getRandomData_result( tmp_success ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class hasDataById_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("hasDataById_args"); private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1); public Long id; public static final int ID = 1; // isset id assignments public hasDataById_args() { } public hasDataById_args( Long id) { this.id = id; } /** * Performs a deep copy on other. */ public hasDataById_args(hasDataById_args other) { if (other.isSetId()) { this.id = TBaseHelper.deepCopy(other.id); } } public hasDataById_args deepCopy() { return new hasDataById_args(this); } public Long getId() { return this.id; } public hasDataById_args setId(Long id) { this.id = id; return this; } public void unsetId() { this.id = null; } // Returns true if field id is set (has been assigned a value) and false otherwise public boolean isSetId() { return this.id != null; } public void setIdIsSet(boolean __value) { if (!__value) { this.id = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof hasDataById_args)) return false; hasDataById_args that = (hasDataById_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetId(), that.isSetId(), this.id, that.id)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {id}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static hasDataById_args deserialize(TProtocol iprot) throws TException { Long tmp_id = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case ID: if (__field.type == TType.I64) { tmp_id = iprot.readI64(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); hasDataById_args _that; _that = new hasDataById_args( tmp_id ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.id != null) { oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI64(this.id); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class hasDataById_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("hasDataById_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); public Boolean success; public static final int SUCCESS = 0; // isset id assignments public hasDataById_result() { } public hasDataById_result( Boolean success) { this.success = success; } /** * Performs a deep copy on other. */ public hasDataById_result(hasDataById_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } public hasDataById_result deepCopy() { return new hasDataById_result(this); } public Boolean isSuccess() { return this.success; } public hasDataById_result setSuccess(Boolean success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been assigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean __value) { if (!__value) { this.success = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof hasDataById_result)) return false; hasDataById_result that = (hasDataById_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {success}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static hasDataById_result deserialize(TProtocol iprot) throws TException { Boolean tmp_success = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case SUCCESS: if (__field.type == TType.BOOL) { tmp_success = iprot.readBool(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); hasDataById_result _that; _that = new hasDataById_result( tmp_success ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class getDataById_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getDataById_args"); private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1); public Long id; public static final int ID = 1; // isset id assignments public getDataById_args() { } public getDataById_args( Long id) { this.id = id; } /** * Performs a deep copy on other. */ public getDataById_args(getDataById_args other) { if (other.isSetId()) { this.id = TBaseHelper.deepCopy(other.id); } } public getDataById_args deepCopy() { return new getDataById_args(this); } public Long getId() { return this.id; } public getDataById_args setId(Long id) { this.id = id; return this; } public void unsetId() { this.id = null; } // Returns true if field id is set (has been assigned a value) and false otherwise public boolean isSetId() { return this.id != null; } public void setIdIsSet(boolean __value) { if (!__value) { this.id = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof getDataById_args)) return false; getDataById_args that = (getDataById_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetId(), that.isSetId(), this.id, that.id)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {id}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static getDataById_args deserialize(TProtocol iprot) throws TException { Long tmp_id = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case ID: if (__field.type == TType.I64) { tmp_id = iprot.readI64(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); getDataById_args _that; _that = new getDataById_args( tmp_id ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.id != null) { oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI64(this.id); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class getDataById_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getDataById_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); public String success; public static final int SUCCESS = 0; // isset id assignments public getDataById_result() { } public getDataById_result( String success) { this.success = success; } /** * Performs a deep copy on other. */ public getDataById_result(getDataById_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } public getDataById_result deepCopy() { return new getDataById_result(this); } public String getSuccess() { return this.success; } public getDataById_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } // Returns true if field success is set (has been assigned a value) and false otherwise public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean __value) { if (!__value) { this.success = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof getDataById_result)) return false; getDataById_result that = (getDataById_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {success}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static getDataById_result deserialize(TProtocol iprot) throws TException { String tmp_success = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case SUCCESS: if (__field.type == TType.STRING) { tmp_success = iprot.readString(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); getDataById_result _that; _that = new getDataById_result( tmp_success ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class putDataById_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("putDataById_args"); private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1); private static final TField DATA_FIELD_DESC = new TField("data", TType.STRING, (short)2); public Long id; public String data; public static final int ID = 1; public static final int DATA = 2; // isset id assignments public putDataById_args() { } public putDataById_args( Long id, String data) { this.id = id; this.data = data; } /** * Performs a deep copy on other. */ public putDataById_args(putDataById_args other) { if (other.isSetId()) { this.id = TBaseHelper.deepCopy(other.id); } if (other.isSetData()) { this.data = TBaseHelper.deepCopy(other.data); } } public putDataById_args deepCopy() { return new putDataById_args(this); } public Long getId() { return this.id; } public putDataById_args setId(Long id) { this.id = id; return this; } public void unsetId() { this.id = null; } // Returns true if field id is set (has been assigned a value) and false otherwise public boolean isSetId() { return this.id != null; } public void setIdIsSet(boolean __value) { if (!__value) { this.id = null; } } public String getData() { return this.data; } public putDataById_args setData(String data) { this.data = data; return this; } public void unsetData() { this.data = null; } // Returns true if field data is set (has been assigned a value) and false otherwise public boolean isSetData() { return this.data != null; } public void setDataIsSet(boolean __value) { if (!__value) { this.data = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof putDataById_args)) return false; putDataById_args that = (putDataById_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetId(), that.isSetId(), this.id, that.id)) { return false; } if (!TBaseHelper.equalsNobinary(this.isSetData(), that.isSetData(), this.data, that.data)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {id, data}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static putDataById_args deserialize(TProtocol iprot) throws TException { Long tmp_id = null; String tmp_data = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case ID: if (__field.type == TType.I64) { tmp_id = iprot.readI64(); } else { TProtocolUtil.skip(iprot, __field.type); } break; case DATA: if (__field.type == TType.STRING) { tmp_data = iprot.readString(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); putDataById_args _that; _that = new putDataById_args( tmp_id ,tmp_data ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.id != null) { oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI64(this.id); oprot.writeFieldEnd(); } if (this.data != null) { oprot.writeFieldBegin(DATA_FIELD_DESC); oprot.writeString(this.data); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class putDataById_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("putDataById_result"); public putDataById_result() { } /** * Performs a deep copy on other. */ public putDataById_result(putDataById_result other) { } public putDataById_result deepCopy() { return new putDataById_result(this); } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof putDataById_result)) return false; putDataById_result that = (putDataById_result)_that; return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static putDataById_result deserialize(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); putDataById_result _that; _that = new putDataById_result( ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class lobDataById_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("lobDataById_args"); private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1); private static final TField DATA_FIELD_DESC = new TField("data", TType.STRING, (short)2); public Long id; public String data; public static final int ID = 1; public static final int DATA = 2; // isset id assignments public lobDataById_args() { } public lobDataById_args( Long id, String data) { this.id = id; this.data = data; } /** * Performs a deep copy on other. */ public lobDataById_args(lobDataById_args other) { if (other.isSetId()) { this.id = TBaseHelper.deepCopy(other.id); } if (other.isSetData()) { this.data = TBaseHelper.deepCopy(other.data); } } public lobDataById_args deepCopy() { return new lobDataById_args(this); } public Long getId() { return this.id; } public lobDataById_args setId(Long id) { this.id = id; return this; } public void unsetId() { this.id = null; } // Returns true if field id is set (has been assigned a value) and false otherwise public boolean isSetId() { return this.id != null; } public void setIdIsSet(boolean __value) { if (!__value) { this.id = null; } } public String getData() { return this.data; } public lobDataById_args setData(String data) { this.data = data; return this; } public void unsetData() { this.data = null; } // Returns true if field data is set (has been assigned a value) and false otherwise public boolean isSetData() { return this.data != null; } public void setDataIsSet(boolean __value) { if (!__value) { this.data = null; } } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof lobDataById_args)) return false; lobDataById_args that = (lobDataById_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetId(), that.isSetId(), this.id, that.id)) { return false; } if (!TBaseHelper.equalsNobinary(this.isSetData(), that.isSetData(), this.data, that.data)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {id, data}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static lobDataById_args deserialize(TProtocol iprot) throws TException { Long tmp_id = null; String tmp_data = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case ID: if (__field.type == TType.I64) { tmp_id = iprot.readI64(); } else { TProtocolUtil.skip(iprot, __field.type); } break; case DATA: if (__field.type == TType.STRING) { tmp_data = iprot.readString(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); lobDataById_args _that; _that = new lobDataById_args( tmp_id ,tmp_data ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.id != null) { oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI64(this.id); oprot.writeFieldEnd(); } if (this.data != null) { oprot.writeFieldBegin(DATA_FIELD_DESC); oprot.writeString(this.data); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class doNothing_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("doNothing_args"); public doNothing_args() { } /** * Performs a deep copy on other. */ public doNothing_args(doNothing_args other) { } public doNothing_args deepCopy() { return new doNothing_args(this); } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof doNothing_args)) return false; doNothing_args that = (doNothing_args)_that; return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static doNothing_args deserialize(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); doNothing_args _that; _that = new doNothing_args( ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } public static class doNothing_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("doNothing_result"); public doNothing_result() { } /** * Performs a deep copy on other. */ public doNothing_result(doNothing_result other) { } public doNothing_result deepCopy() { return new doNothing_result(this); } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof doNothing_result)) return false; doNothing_result that = (doNothing_result)_that; return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static doNothing_result deserialize(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); doNothing_result _that; _that = new doNothing_result( ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } } }