Package io.airlift.http.client.testing

Examples of io.airlift.http.client.testing.TestingHttpClient


        ExchangeClient exchangeClient = new ExchangeClient(createTestingBlockEncodingManager(),
                new DataSize(32, Unit.MEGABYTE),
                maxResponseSize,
                1,
                new Duration(1, TimeUnit.MINUTES),
                new TestingHttpClient(processor, executor),
                executor);

        exchangeClient.addLocation(location);
        exchangeClient.noMoreLocations();
View Full Code Here


        ExchangeClient exchangeClient = new ExchangeClient(createTestingBlockEncodingManager(),
                new DataSize(32, Unit.MEGABYTE),
                maxResponseSize,
                1,
                new Duration(1, TimeUnit.MINUTES),
                new TestingHttpClient(processor, newCachedThreadPool(daemonThreadsNamed("test-%s"))),
                executor);

        URI location1 = URI.create("http://localhost:8081/foo");
        processor.addPage(location1, createPage(1));
        processor.addPage(location1, createPage(2));
View Full Code Here

        ExchangeClient exchangeClient = new ExchangeClient(createTestingBlockEncodingManager(),
                new DataSize(1, Unit.BYTE),
                maxResponseSize,
                1,
                new Duration(1, TimeUnit.MINUTES),
                new TestingHttpClient(processor, newCachedThreadPool(daemonThreadsNamed("test-%s"))),
                executor);

        URI location = URI.create("http://localhost:8080");
        exchangeClient.addLocation(location);
        exchangeClient.noMoreLocations();
View Full Code Here

        @SuppressWarnings("resource")
        ExchangeClient exchangeClient = new ExchangeClient(createTestingBlockEncodingManager(),
                new DataSize(1, Unit.BYTE),
                maxResponseSize, 1,
                new Duration(1, TimeUnit.MINUTES),
                new TestingHttpClient(processor, newCachedThreadPool(daemonThreadsNamed("test-%s"))),
                executor);
        exchangeClient.addLocation(location);
        exchangeClient.noMoreLocations();

        // fetch a page
View Full Code Here

        processor.setComplete(location);

        ExchangeClient exchangeClient = new ExchangeClient(new DataSize(32, Unit.MEGABYTE),
                maxResponseSize,
                1,
                new TestingHttpClient(processor, executor),
                executor);

        exchangeClient.addLocation(location);
        exchangeClient.noMoreLocations();
View Full Code Here

        MockExchangeRequestProcessor processor = new MockExchangeRequestProcessor(maxResponseSize);

        ExchangeClient exchangeClient = new ExchangeClient(new DataSize(32, Unit.MEGABYTE),
                maxResponseSize,
                1,
                new TestingHttpClient(processor, newCachedThreadPool(daemonThreadsNamed("test-%s"))),
                executor);

        URI location1 = URI.create("http://localhost:8081/foo");
        processor.addPage(location1, createPage(1));
        processor.addPage(location1, createPage(2));
View Full Code Here

        MockExchangeRequestProcessor processor = new MockExchangeRequestProcessor(maxResponseSize);

        ExchangeClient exchangeClient = new ExchangeClient(new DataSize(1, Unit.BYTE),
                maxResponseSize,
                1,
                new TestingHttpClient(processor, newCachedThreadPool(daemonThreadsNamed("test-%s"))),
                executor);

        URI location = URI.create("http://localhost:8080");
        exchangeClient.addLocation(location);
        exchangeClient.noMoreLocations();
View Full Code Here

        processor.addPage(location, createPage(2));
        processor.addPage(location, createPage(3));

        ExchangeClient exchangeClient = new ExchangeClient(new DataSize(1, Unit.BYTE),
                maxResponseSize, 1,
                new TestingHttpClient(processor, newCachedThreadPool(daemonThreadsNamed("test-%s"))),
                executor);
        exchangeClient.addLocation(location);
        exchangeClient.noMoreLocations();

        // fetch a page
View Full Code Here

    public void setUp()
            throws Exception
    {
        executor = newCachedThreadPool(daemonThreadsNamed("test-%s"));

        httpClient = new TestingHttpClient(new HttpClientHandler(taskBuffers), executor);

        exchangeClientSupplier = new Supplier<ExchangeClient>()
        {
            @Override
            public ExchangeClient get()
View Full Code Here

TOP

Related Classes of io.airlift.http.client.testing.TestingHttpClient

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.