Package com.linkedin.r2.message

Examples of com.linkedin.r2.message.Message


    TransportDispatcher dispatcher = new DelegatingTransportDispatcher(new RestLiServer(config,
                                                                                        resourceFactory,
                                                                                        engine));

    final FilterChain fc = FilterChains.empty().addLast(new SimpleLoggingFilter());
    final HttpServer server = new HttpServerFactory(fc).createServer(port,
                                                               HttpServerFactory.DEFAULT_CONTEXT_PATH,
                                                               NUM_THREADS,
                                                               dispatcher,
                                                               enableAsync,
View Full Code Here


  public Object[][] compressorDataProvider()
  {
    return new Object[][]
      {
        { new SnappyCompressor() },
        { new Bzip2Compressor() },
        { new GzipCompressor() },
        { new DeflateCompressor()}
      };
  }
View Full Code Here

  }

  @Test(dataProvider = "contentEncodingGeneratorDataProvider")
  public void testEncodingGeneration(EncodingType[] encoding, String acceptEncoding)
  {
    ClientCompressionFilter cf = new ClientCompressionFilter(EncodingType.IDENTITY,
                                                             encoding,
                                                             Arrays.asList(new String[]{"*"}));
    Assert.assertEquals(cf.buildAcceptEncodingHeader(), acceptEncoding);
  }
View Full Code Here

    return new Object[][]
      {
        { new SnappyCompressor() },
        { new Bzip2Compressor() },
        { new GzipCompressor() },
        { new DeflateCompressor()}
      };
  }
View Full Code Here

  {
    return new Object[][]
      {
        { new SnappyCompressor() },
        { new Bzip2Compressor() },
        { new GzipCompressor() },
        { new DeflateCompressor()}
      };
  }
View Full Code Here

  @DataProvider
  public Object[][] compressorDataProvider()
  {
    return new Object[][]
      {
        { new SnappyCompressor() },
        { new Bzip2Compressor() },
        { new GzipCompressor() },
        { new DeflateCompressor()}
      };
  }
View Full Code Here

    TransportDispatcher dispatcher = new DelegatingTransportDispatcher(new RestLiServer(config,
                                                                                        resourceFactory,
                                                                                        engine));

    final FilterChain fc = FilterChains.empty().addLast(new SimpleLoggingFilter());
    final HttpServer server = new HttpServerFactory(fc).createServer(port,
                                                               HttpServerFactory.DEFAULT_CONTEXT_PATH,
                                                               NUM_THREADS,
                                                               dispatcher,
                                                               enableAsync,
View Full Code Here

  public RestliHttpRequestHandler(RestLiConfig config,
                                  SpringInjectResourceFactory injectResourceFactory,
                                  FilterChain filterChain)
  {
    _r2Servlet = new RAPServlet(
        new FilterChainDispatcher(
            new DelegatingTransportDispatcher(
                new RestLiServer(config, injectResourceFactory)),
            filterChain
        )
    );
View Full Code Here

  {
    final MessageBuilder<?> builder = new RpcRequestBuilder(URI.create("test"))
            .setEntity(new byte[] {1,2,3,4})
            .build()
            .builder();
    final Message req = builder
            .setEntity(new byte[] {5,6,7,8})
            .build();

    Assert.assertEquals(new byte[] {5,6,7,8}, req.getEntity().copyBytes());
    Assert.assertTrue(req instanceof RpcRequest);
    Assert.assertEquals(URI.create("test"), ((RpcRequest)req).getURI());
  }
View Full Code Here

    final MessageBuilder<?> builder = new RpcResponseBuilder()
              .setEntity(new byte[] {1,2,3,4})
              .build()
              .builder();

    final Message res = builder
              .setEntity(new byte[] {5,6,7,8})
              .build();

    Assert.assertEquals(new byte[] {5,6,7,8}, res.getEntity().copyBytes());
  }
View Full Code Here

TOP

Related Classes of com.linkedin.r2.message.Message

Copyright © 2018 www.massapicom. 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.