@Override public Token createEmptyAuthToken() { return new Token(); }
public Token deepCopy() { return new Token(this); }
/** * Performs a deep copy on <i>other</i>. */ public greet_args(greet_args other) { if (other.isSetToken()) { this.token = new Token(other.token); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, greet_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token = new Token(); struct.token.read(iprot); struct.setTokenIsSet(true); } } }
public void read(org.apache.thrift.protocol.TProtocol iprot, greet_args 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) { case 1: // TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.token = new Token(); struct.token.read(iprot); struct.setTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }
public void testUnauthorizedCall() throws Exception { client.greet(new Token("heisnot")); } }
public void testSimpleCall() throws Exception { assertEquals("Hello John Smith", client.greet(new Token("heisours"))); }