Examples of RpcRequestBuilder


Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

    // check the rewrite
    assertEquals(wrappedClient.restRequest.getURI(),
                 URI.create("http://test.linkedin.com/test/getCube"));
    assertEquals(wrappedClient.restWireAttrs, restWireAttrs);

    RpcRequest rpcRequest = new RpcRequestBuilder(URI.create("d2://HistoryService/getCube")).build();
    Map<String, String> rpcWireAttrs = new HashMap<String, String>();
    TestTransportCallback<RpcResponse> rpcCallback =
        new TestTransportCallback<RpcResponse>();

    client.rpcRequest(rpcRequest, new RequestContext(), rpcWireAttrs, rpcCallback);
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

    assertFalse(restCallback.response.hasError());
    assertEquals(wrappedClient.restRequest, restRequest);
    assertEquals(wrappedClient.restWireAttrs, restWireAttrs);

    RpcRequest rpcRequest = new RpcRequestBuilder(uri).build();
    Map<String, String> rpcWireAttrs = new HashMap<String, String>();
    TestTransportCallback<RpcResponse> rpcCallback =
        new TestTransportCallback<RpcResponse>();

    client.rpcRequest(rpcRequest, new RequestContext(), rpcWireAttrs, rpcCallback);
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

    client.restRequest(restRequest, restCallback);

    assertNull(restCallback.e);
    assertNotNull(restCallback.t);

    RpcRequest rpcRequest = new RpcRequestBuilder(uri).build();
    TestCallback<RpcResponse> rpcCallback = new TestCallback<RpcResponse>();

    client.rpcRequest(rpcRequest, rpcCallback);

    assertNotNull(rpcCallback.e);
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

  @Test
  @SuppressWarnings("deprecation")
  public void testSimpleRpcReq() throws IOException
  {
    final RpcRequest expected = new RpcRequestBuilder(URI.create("http://localhost:1234"))
            .build();
    assertMsgEquals(expected, _serializer.readRpcRequest(getResource("simple-rpc-req.txt")));
  }
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

  @Test
  @SuppressWarnings("deprecation")
  public void testRpcReqWithEntity() throws IOException
  {
    final RpcRequest expected = new RpcRequestBuilder(URI.create("http://localhost:1234"))
            .setEntity(ByteString.copyString("This is a simple entity!", "ASCII"))
            .build();
    assertMsgEquals(expected, _serializer.readRpcRequest(getResource("rpc-req-with-entity.txt")));
  }
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

  }

  @SuppressWarnings("deprecation")
  private RpcRequest createRpcRequest()
  {
    return new RpcRequestBuilder(URI.create("http://linkedin.com")).build();
  }
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

  }

  @SuppressWarnings("deprecation")
  private void fireRpcRequest(FilterChain fc)
  {
    fc.onRpcRequest(new RpcRequestBuilder(URI.create("test")).build(),
                    createRequestContext(), createWireAttributes()
    );
  }
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

{
  @Test
  @SuppressWarnings("deprecation")
  public void testChainBuildRpcRequestFromRpcRequestBuilder()
  {
    final RpcRequest req = new RpcRequestBuilder(URI.create("test"))
            .setEntity(new byte[] {1,2,3,4})
            .build()
            .builder()
              .setEntity(new byte[] {5,6,7,8})
              .setURI(URI.create("anotherURI"))
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

  @Test
  @SuppressWarnings("deprecation")
  public void testChainBuildRpcRequestFromRequestBuilder()
  {
    final Request req = new RpcRequestBuilder(URI.create("test"))
            .setEntity(new byte[] {1,2,3,4})
            .build()
            .requestBuilder()
              .setEntity(new byte[] {5,6,7,8})
              .setURI(URI.create("anotherURI"))
View Full Code Here

Examples of com.linkedin.r2.message.rpc.RpcRequestBuilder

  @Test
  @SuppressWarnings("deprecation")
  public void testChainBuildRpcRequestFromRpcBuilder()
  {
    final RpcMessage req = new RpcRequestBuilder(URI.create("test"))
            .setEntity(new byte[] {1,2,3,4})
            .build()
            .rpcBuilder()
              .setEntity(new byte[] {5,6,7,8})
              .build();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.