Package io.reactivex.netty.client.RxClient.ClientConfig

Examples of io.reactivex.netty.client.RxClient.ClientConfig.Builder


    }

    @Test
    public void testTimeout() throws Exception {
        int timeoutMillis = 10;
        RxClient.ClientConfig clientConfig = new Builder(null)
                .readTimeout(timeoutMillis, TimeUnit.MILLISECONDS).build();
        HttpClient<ByteBuf, ByteBuf> client = new HttpClientBuilder<ByteBuf, ByteBuf>("localhost", port)
                .config(clientConfig).build();
        Observable<HttpClientResponse<ByteBuf>> response =
                client.submit(HttpClientRequest.createGet("test/timeout?timeout=" + timeoutMillis * 2 /*Create bigger wait than timeout*/));
 
View Full Code Here


        }
    }

    @Test
    public void testNoReadTimeout() throws Exception {
        RxClient.ClientConfig clientConfig = new Builder(null)
                .readTimeout(2, TimeUnit.SECONDS).build();
        HttpClient<ByteBuf, ByteBuf> client = new HttpClientBuilder<ByteBuf, ByteBuf>("localhost", port).config(clientConfig).build();
        Observable<HttpClientResponse<ByteBuf>> response =
                client.submit(HttpClientRequest.createGet("test/singleEntity"));
View Full Code Here

TOP

Related Classes of io.reactivex.netty.client.RxClient.ClientConfig.Builder

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.