Class HttpConnectionPoolService.KeepAliveStrategy

  • All Implemented Interfaces:
    org.apache.http.conn.ConnectionKeepAliveStrategy
    Enclosing class:
    HttpConnectionPoolService

    public class HttpConnectionPoolService.KeepAliveStrategy
    extends Object
    implements org.apache.http.conn.ConnectionKeepAliveStrategy
    A connection keep-alive strategy that obeys the Keep-Alive header and applies a default if none is given. Swiped from https://www.baeldung.com/httpclient-connection-management
    • Constructor Detail

      • KeepAliveStrategy

        public KeepAliveStrategy()
    • Method Detail

      • getKeepAliveDuration

        public long getKeepAliveDuration​(org.apache.http.HttpResponse response,
                                         org.apache.http.protocol.HttpContext context)
        Specified by:
        getKeepAliveDuration in interface org.apache.http.conn.ConnectionKeepAliveStrategy