Package org.dspace.service.impl
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetKeepAliveDuration(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)
-
Constructor Details
-
KeepAliveStrategy
public KeepAliveStrategy()
-
-
Method Details
-
getKeepAliveDuration
public long getKeepAliveDuration(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) - Specified by:
getKeepAliveDurationin interfaceorg.apache.http.conn.ConnectionKeepAliveStrategy
-