02 May 2019

HTTP client timeouts

https://docs.spring.io/autorepo/docs/spring-framework/4.1.7.RELEASE/javadoc-api/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.html

        HttpComponentsClientHttpRequestFactory requestFactory =
                new HttpComponentsClientHttpRequestFactory();

        requestFactory.setConnectionRequestTimeout(connectRequestTimeout);
        requestFactory.setConnectTimeout(connectTimeout);
        requestFactory.setReadTimeout(readTimeout);

       


setConnectionRequestTimeout(int connectionRequestTimeout)
Set the timeout in milliseconds used when requesting a connection from the connection manager using the underlying HttpClient.
(del manager!, del http pool, si no tiene conexiones para ofrecer)


setConnectTimeout(int timeout)
Set the connection timeout for the underlying HttpClient.
(conexion con el server)


setReadTimeout(int timeout)
Set the socket read timeout for the underlying HttpClient.
(lectura del response).

My Blog List

Blog Archive

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.