public void read(org.apache.thrift.protocol.TProtocol iprot, NullStruct struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, invokeMethod_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBinary(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
short magic = in.readI16(); in.readI32(); in.readI16(); byte version = in.readByte(); String serviceName = in.readString(); long id = in.readI64(); TProtocol protocol = protocolFactory.getProtocol(transport); headerProtocol.writeI16(magic); headerProtocol.writeI32(Integer.MAX_VALUE); headerProtocol.writeI16(Short.MAX_VALUE); headerProtocol.writeByte(version); headerProtocol.writeString(serviceName); headerProtocol.writeI64(id); headerProtocol.getTransport().flush(); out.writeI16(magic); out.writeI32(bos.size() + header.size()); out.writeI16((short) (0xffff & header.size())); out.writeByte(version); out.writeString(serviceName); out.writeI64(id); out.getTransport().write(bos.toByteArray()); out.getTransport().flush();
protected void encodeRequest(Channel channel, ChannelBuffer buffer, Request request) throws IOException { Invocation invocation = (Invocation) request.getData(); TProtocol protocol = newProtocol(channel.getUrl(), buffer); try { protocol.writeMessageBegin(new TMessage( invocation.getMethodName(), TMessageType.CALL, thriftSeq.getAndIncrement())); protocol.writeStructBegin(new TStruct(invocation.getMethodName() + "_args")); for (int i = 0; i < invocation.getParameterTypes().length; i++) { Class<?> type = invocation.getParameterTypes()[i]; } } catch (TException e) { throw new IOException(e.getMessage(), e); } }
public void sendRequest() throws IOException, TException { TProtocol out = new TBinaryProtocol(new TIOStreamTransport(socketToServer.getOutputStream())); out.writeMessageBegin(new TMessage("dummy", TMessageType.CALL, 0)); out.writeStructBegin(new TStruct("dummy_args")); out.writeFieldStop(); out.writeStructEnd(); out.writeMessageEnd(); out.getTransport().flush(); }
@Override protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(fieldID); if (setField != null) { switch (setField) { case I32_VALUE: Integer i32Value; i32Value = iprot.readI32(); return i32Value; case STRING_VALUE: String stringValue; stringValue = iprot.readString(); return stringValue; default: throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { throw new TProtocolException("Couldn't find a field with field id " + fieldID); } }
@Override public Object deserialize(Object reuse, TProtocol iprot) throws SerDeException, TException, IllegalAccessException { if (thrift_mode) { iprot.readStructBegin(); } Object o = fieldList.deserialize(reuse, iprot); if (thrift_mode) { iprot.readStructEnd(); } return o; }
@Override public Object deserialize(Object reuse, TProtocol iprot) throws SerDeException, TException, IllegalAccessException { return iprot.readString(); }
protected void encodeRequest(Channel channel, ChannelBuffer buffer, Request request) throws IOException { Invocation invocation = (Invocation) request.getData(); TProtocol protocol = newProtocol(channel.getUrl(), buffer); try { protocol.writeMessageBegin(new TMessage( invocation.getMethodName(), TMessageType.CALL, thriftSeq.getAndIncrement())); protocol.writeStructBegin(new TStruct(invocation.getMethodName() + "_args")); for (int i = 0; i < invocation.getParameterTypes().length; i++) { Class<?> type = invocation.getParameterTypes()[i]; } } catch (TException e) { throw new IOException(e.getMessage(), e); } }
public String deserialize(TProtocol iprot) throws SerDeException, TException, IllegalAccessException { return iprot.readString(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, registerInterpreterProcess_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, getAllResources_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.intpGroupId != null) { oprot.writeFieldBegin(INTP_GROUP_ID_FIELD_DESC); oprot.writeString(struct.intpGroupId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
short magic = in.readI16(); in.readI32(); in.readI16(); byte version = in.readByte(); String serviceName = in.readString(); long id = in.readI64(); TProtocol protocol = protocolFactory.getProtocol(transport); headerProtocol.writeI16(magic); headerProtocol.writeI32(Integer.MAX_VALUE); headerProtocol.writeI16(Short.MAX_VALUE); headerProtocol.writeByte(version); headerProtocol.writeString(serviceName); headerProtocol.writeI64(id); headerProtocol.getTransport().flush(); out.writeI16(magic); out.writeI32(bos.size() + header.size()); out.writeI16((short) (0xffff & header.size())); out.writeByte(version); out.writeString(serviceName); out.writeI64(id); out.getTransport().write(bos.toByteArray()); out.getTransport().flush();
protected void encodeRequest(Channel channel, ChannelBuffer buffer, Request request) throws IOException { Invocation invocation = (Invocation) request.getData(); TProtocol protocol = newProtocol(channel.getUrl(), buffer); try { protocol.writeMessageBegin(new TMessage( invocation.getMethodName(), TMessageType.CALL, thriftSeq.getAndIncrement())); protocol.writeStructBegin(new TStruct(invocation.getMethodName() + "_args")); for (int i = 0; i < invocation.getParameterTypes().length; i++) { Class<?> type = invocation.getParameterTypes()[i]; } } catch (TException e) { throw new IOException(e.getMessage(), e); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, appendOutput_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, getResource_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.resourceIdJson != null) { oprot.writeFieldBegin(RESOURCE_ID_JSON_FIELD_DESC); oprot.writeString(struct.resourceIdJson); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
protected void encodeRequest(Channel channel, ChannelBuffer buffer, Request request) throws IOException { Invocation invocation = (Invocation) request.getData(); TProtocol protocol = newProtocol(channel.getUrl(), buffer); try { protocol.writeMessageBegin(new TMessage( invocation.getMethodName(), TMessageType.CALL, thriftSeq.getAndIncrement())); protocol.writeStructBegin(new TStruct(invocation.getMethodName() + "_args")); for (int i = 0; i < invocation.getParameterTypes().length; i++) { Class<?> type = invocation.getParameterTypes()[i]; } } catch (TException e) { throw new IOException(e.getMessage(), e); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, appendAppOutput_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, getFormType_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
protected void encodeRequest(Channel channel, ChannelBuffer buffer, Request request) throws IOException { Invocation invocation = (Invocation) request.getData(); TProtocol protocol = newProtocol(channel.getUrl(), buffer); try { protocol.writeMessageBegin(new TMessage( invocation.getMethodName(), TMessageType.CALL, thriftSeq.getAndIncrement())); protocol.writeStructBegin(new TStruct(invocation.getMethodName() + "_args")); for(int i = 0; i < invocation.getParameterTypes().length; i++) { Class<?> type = invocation.getParameterTypes()[i]; } } catch (TException e) { throw new IOException(e.getMessage(), e); } }