Package io.reactivex.netty.client

Examples of io.reactivex.netty.client.CompositePoolLimitDeterminationStrategy


public class MetricsTest {

    @Test
    public void testConnectionPoolMetrics() throws InterruptedException, ExecutionException, TimeoutException {
        HttpClientBuilder<ByteBuf, ByteBuf> builder = RxContexts.newHttpClientBuilder("www.google.com", 80, RxContexts.DEFAULT_CORRELATOR);
        HttpClient<ByteBuf, ByteBuf> client = builder.withConnectionPoolLimitStrategy(new CompositePoolLimitDeterminationStrategy(
                new MaxConnectionsBasedStrategy(100), new MaxConnectionsBasedStrategy(100))).build();
        HttpClientListener listener = HttpClientListener.newHttpListener("default");
        client.subscribe(listener);
        HttpClientRequest<ByteBuf> request = HttpClientRequest.createGet("/");
        client.submit(request).flatMap(new Func1<HttpClientResponse<ByteBuf>, Observable<ByteBuf>>(){
View Full Code Here

TOP

Related Classes of io.reactivex.netty.client.CompositePoolLimitDeterminationStrategy

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.