Class HttpConnectionPoolService.KeepAliveStrategy

java.lang.Object
org.dspace.service.impl.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 Details

    • KeepAliveStrategy

      public KeepAliveStrategy()
  • Method Details

    • 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