FileDocCategorySizeDatePackage
RequestConnControl.javaAPI DocAndroid 1.5 API2439Wed May 06 22:41:10 BST 2009org.apache.http.protocol

RequestConnControl

public class RequestConnControl extends Object implements HttpRequestInterceptor
A request interceptor that suggests connection keep-alive to the server.
author
Oleg Kalnichevski
version
$Revision: 496070 $
since
4.0

Fields Summary
Constructors Summary
public RequestConnControl()

        super();
    
Methods Summary
public voidprocess(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context)

        if (request == null) {
            throw new IllegalArgumentException("HTTP request may not be null");
        }
        if (!request.containsHeader(HTTP.CONN_DIRECTIVE)) {
            // Default policy is to keep connection alive
            // whenever possible
            request.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);
        }