Class RequestConnectionClose
- java.lang.Object
-
- net.shibboleth.utilities.java.support.httpclient.RequestConnectionClose
-
- All Implemented Interfaces:
org.apache.http.HttpRequestInterceptor
public class RequestConnectionClose extends Object implements org.apache.http.HttpRequestInterceptor
Adds aConnection: closeto all HTTP/1.1 requests.This interceptor essentially disables connection keep-alive support and, by virtue of the server closing the connection, prevents a
ClientConnectionManagerfrom holding open and reusing connections. If you'd like to allow theClientConnectionManagerto hold open connections for a while and potentially reuse them consider using theIdleConnectionSweeperto limit the amount of time the connections are held open.
-
-
Constructor Summary
Constructors Constructor Description RequestConnectionClose()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocess(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context)
-
-
-
Method Detail
-
process
public void process(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException, IOException- Specified by:
processin interfaceorg.apache.http.HttpRequestInterceptor- Throws:
org.apache.http.HttpExceptionIOException
-
-