5354555657585960616263
_service.echo(msg, new CallbackAdapter<RpcResponse,String>(callback) { @Override protected RpcResponse convertResponse(String response) { return new RpcResponseBuilder() .setEntity(ByteString.copyString(response, CHARSET)) .build(); } }); }
387388389390391392393
} @SuppressWarnings("deprecation") private RpcResponse createRpcResponse() { return new RpcResponseBuilder().build(); }
243244245246247248249250251
} @SuppressWarnings("deprecation") private void fireRpcResponse(FilterChain fc) { fc.onRpcResponse(new RpcResponseBuilder().build(), createRequestContext(), createWireAttributes() ); }
110111112113114115116117118119120
@Test @SuppressWarnings("deprecation") public void testChainBuildRpcResponseFromRpcResponseBuilder() { final RpcResponse res = new RpcResponseBuilder() .setEntity(new byte[] {1,2,3,4}) .build() .builder() .setEntity(new byte[] {5,6,7,8}) .build();
124125126127128129130131132133134
@Test @SuppressWarnings("deprecation") public void testChainBuildRpcResponseFromResponseBuilder() { final Response res = new RpcResponseBuilder() .setEntity(new byte[] {1,2,3,4}) .build() .responseBuilder() .setEntity(new byte[] {5,6,7,8}) .build();
138139140141142143144145146147148
@Test @SuppressWarnings("deprecation") public void testChainBuildRpcResponseFromRpcBuilder() { final RpcMessage res = new RpcResponseBuilder() .setEntity(new byte[] {1,2,3,4}) .build() .rpcBuilder() .setEntity(new byte[] {5,6,7,8}) .build();
152153154155156157158159160161162
@Test @SuppressWarnings("deprecation") public void testChainBuildRpcResponseFromMessageBuilder() { final MessageBuilder<?> builder = new RpcResponseBuilder() .setEntity(new byte[] {1,2,3,4}) .build() .builder(); final Message res = builder
182183184185186187188189
} @SuppressWarnings("deprecation") public static RpcResponse simpleRpcResponse() { return new RpcResponseBuilder() .build(); }
444445446447448449450
public void handleRequest(RpcRequest request, final Callback<RpcResponse> callback) { System.out.println("RPC server request: " + request.getEntity().asString("UTF-8")); callback.onSuccess(new RpcResponseBuilder().setEntity(request.getEntity()).build()); }
226227228229230231232233234235236
+ uri), response.getWireAttributes()); } else { newResponse = TransportResponseImpl.success(new RpcResponseBuilder() .setEntity(httpResponse.getEntity()) .build(), response.getWireAttributes()); } } else