net.shibboleth.utilities.java.support.httpclient
Class RequestConnectionClose

java.lang.Object
  extended by 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 a Connection: close to all HTTP/1.1 requests.

This interceptor essentially disables connection keep-alive support and, by virtue of the server closing the connection, prevents a ClientConnectionManager from holding open and reusing connections. If you'd like to allow the ClientConnectionManager to hold open connections for a while and potentially reuse them consider using the IdleConnectionSweeper to limit the amount of time the connections are held open.


Constructor Summary
RequestConnectionClose()
           
 
Method Summary
 void process(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestConnectionClose

public RequestConnectionClose()
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:
process in interface org.apache.http.HttpRequestInterceptor
Throws:
org.apache.http.HttpException
IOException


Copyright © 1999-2012. All Rights Reserved.