public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_greet(); } }
public String getGreetingForKey(String key, String lastName, String firstName) throws TException { return clientsMap.get(key).greet(new TName(firstName, lastName)); }
public String getGreetingWithTimeout(String lastName, String firstName) throws TException { return clientWithTimeout.greet(new TName(firstName, lastName)); }
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } }
public String getOneOffGreetingWithTimeout(String lastName, String firstName) throws TException { return oneoffClientWithTimeout.greet(new TName(firstName, lastName)); }
public String getRetriableGreetingWithTimeout(String lastName, String firstName) throws TException { return retriableClientWithTimeout.greet(new TName(firstName, lastName)); }
public String getGreeting(String lastName, String firstName) throws TException { return client.greet(new TName(firstName, lastName)); }
public String getGreetingWithMisconfguration(String lastName, String firstName) throws TException { return misconfigurableClient.greet(new TName(firstName, lastName)); } }
public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
@Before public void setUp() throws Exception { TTransport transport = new THttpClient("http://localhost:" + port + "/api"); TProtocol protocol = protocolFactory.getProtocol(transport); client = new TGreetingService.Client(protocol); }
public String greet(TName name) throws org.apache.thrift.TException { send_greet(name); return recv_greet(); }
@Async public Future<String> getGreeting(String lastName, String firstName) throws TException { return new AsyncResult<>(client.greet(new TName(firstName, lastName))); } }
@Before public void setUp() throws Exception { TTransport transport = new THttpClient("http://localhost:" + port + "/api"); TProtocol protocol = protocolFactory.getProtocol(transport); client = new TGreetingService.Client(protocol); }
public void send_greet(TName name) throws org.apache.thrift.TException { greet_args args = new greet_args(); args.setName(name); sendBase("greet", args); }
public String recv_greet() throws org.apache.thrift.TException { greet_result result = new greet_result(); receiveBase(result, "greet"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "greet failed: unknown result"); }