Class HttpClientProperties


  • public class HttpClientProperties
    extends Object
    HTTP client properties.
    • Method Detail

      • maxIdleTime

        public Integer maxIdleTime()
        The maximum time persistent connections can stay idle while kept alive in the connection pool. Connections whose inactivity period exceeds this value will get closed and evicted from the pool.
        Returns:
        the maximum idle time expressed in seconds
      • isKeepAlive

        public boolean isKeepAlive()
        Indicates whether or not a custom connection keep-alive time should be used. If set to false, the HTTP client will use the default connection keep-alive strategy, which is to use only the server instructions (if any) set in the Keep-Alive response header. If set to true, the HTTP client will use a custom connection keep-alive strategy which uses the server instructions set in the Keep-Alive response header; if the response doesn't contain a Keep-Alive header, the client will use a default keep-alive period indicated by maxKeepAliveTime().
        Returns:
        whether or not a custom connection keep-alive strategy should be used
        See Also:
        maxKeepAliveTime(), Keep-Alive
      • maxKeepAliveTime

        public Integer maxKeepAliveTime()
        The time a connection can remain idle as part of the keep-alive strategy. This value is only used if isKeepAlive() is set to true. Defaults to 2 minutes.
        Returns:
        the maximum custom keep-alive time expressed in seconds
      • maxConnectionTotal

        public Integer maxConnectionTotal()
        The maximum number of connections the client may keep open at the same time across all routes.
        Returns:
        the maximum number of connections
      • maxConnectionRoute

        public Integer maxConnectionRoute()
        The maximum number of connections the client may keep open at the same time per route.
        Returns:
        the maximum number of connections per route
      • getProxy

        public org.apache.http.HttpHost getProxy()
        The proxy to use when connecting to the remote server.
        Returns:
        the proxy