org.apache.http.client.params
Class HttpClientParams

java.lang.Object
  extended by org.apache.http.client.params.HttpClientParams

public class HttpClientParams
extends java.lang.Object

An adaptor for accessing HTTP client parameters in HttpParams.

Since:
4.0
Version:
$Revision: 555245 $
Author:
Oleg Kalnichevski

Field Summary
static java.lang.String ALLOW_CIRCULAR_REDIRECTS
          Defines whether circular redirects (redirects to the same location) should be allowed.
static java.lang.String AUTH_SCHEME_PRIORITY
          The key used to look up the list of IDs of supported authentication schemes in their order of preference.
static java.lang.String CONNECTION_MANAGER_FACTORY
          Defines the class name of the default ClientConnectionManager
static java.lang.String CONNECTION_MANAGER_TIMEOUT
          Defines the timeout in milliseconds used when retrieving an instance of ManagedClientConnection from the ClientConnectionManager.
static java.lang.String COOKIE_POLICY
          Defines the name of the cookie specification to be used for HTTP state management.
static java.lang.String DEFAULT_HEADERS
          Defines the request headers to be sent per default with each request.
static java.lang.String DEFAULT_HOST
          Defines the default host.
static java.lang.String DEFAULT_PROXY
          Defines the default proxy.
static java.lang.String HANDLE_AUTHENTICATION
          Defines whether authentication should be handled automatically.
static java.lang.String HANDLE_REDIRECTS
          Defines whether redirects should be handled automatically
static java.lang.String MAX_REDIRECTS
          Defines the maximum number of redirects to be followed.
static java.lang.String PREEMPTIVE_AUTHENTICATION
          Defines whether authentication should be attempted preemptively.
static java.lang.String REJECT_RELATIVE_REDIRECT
          Defines whether relative redirects should be rejected.
static java.lang.String VIRTUAL_HOST
          Defines the virtual host name.
 
Method Summary
static long getConnectionManagerTimeout(org.apache.http.params.HttpParams params)
          Returns the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.
static java.lang.String getCookiePolicy(org.apache.http.params.HttpParams params)
           
static boolean isAuthenticating(org.apache.http.params.HttpParams params)
           
static boolean isAuthenticationPreemptive(org.apache.http.params.HttpParams params)
          Returns true if authentication should be attempted preemptively, false otherwise.
static boolean isRedirecting(org.apache.http.params.HttpParams params)
           
static void setAuthenticating(org.apache.http.params.HttpParams params, boolean value)
           
static void setAuthenticationPreemptive(org.apache.http.params.HttpParams params, boolean value)
          Sets whether authentication should be attempted preemptively.
static void setConnectionManagerTimeout(org.apache.http.params.HttpParams params, long timeout)
          Sets the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.
static void setCookiePolicy(org.apache.http.params.HttpParams params, java.lang.String cookiePolicy)
           
static void setRedirecting(org.apache.http.params.HttpParams params, boolean value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTION_MANAGER_TIMEOUT

public static final java.lang.String CONNECTION_MANAGER_TIMEOUT
Defines the timeout in milliseconds used when retrieving an instance of ManagedClientConnection from the ClientConnectionManager.

This parameter expects a value of type Long.

See Also:
Constant Field Values

CONNECTION_MANAGER_FACTORY

public static final java.lang.String CONNECTION_MANAGER_FACTORY
Defines the class name of the default ClientConnectionManager

This parameter expects a value of type String.

See Also:
Constant Field Values

HANDLE_REDIRECTS

public static final java.lang.String HANDLE_REDIRECTS
Defines whether redirects should be handled automatically

This parameter expects a value of type Boolean.

See Also:
Constant Field Values

REJECT_RELATIVE_REDIRECT

public static final java.lang.String REJECT_RELATIVE_REDIRECT
Defines whether relative redirects should be rejected.

This parameter expects a value of type Boolean.

See Also:
Constant Field Values

MAX_REDIRECTS

public static final java.lang.String MAX_REDIRECTS
Defines the maximum number of redirects to be followed. The limit on number of redirects is intended to prevent infinite loops.

This parameter expects a value of type Integer.

See Also:
Constant Field Values

ALLOW_CIRCULAR_REDIRECTS

public static final java.lang.String ALLOW_CIRCULAR_REDIRECTS
Defines whether circular redirects (redirects to the same location) should be allowed. The HTTP spec is not sufficiently clear whether circular redirects are permitted, therefore optionally they can be enabled

This parameter expects a value of type Boolean.

See Also:
Constant Field Values

HANDLE_AUTHENTICATION

public static final java.lang.String HANDLE_AUTHENTICATION
Defines whether authentication should be handled automatically.

This parameter expects a value of type Boolean.

See Also:
Constant Field Values

PREEMPTIVE_AUTHENTICATION

public static final java.lang.String PREEMPTIVE_AUTHENTICATION
Defines whether authentication should be attempted preemptively.

This parameter expects a value of type Boolean.

See Also:
Constant Field Values

AUTH_SCHEME_PRIORITY

public static final java.lang.String AUTH_SCHEME_PRIORITY
The key used to look up the list of IDs of supported authentication schemes in their order of preference. The scheme IDs are stored in a Collection as instances of String.

If several schemes are returned in the WWW-Authenticate or Proxy-Authenticate header, this parameter defines which authentication schemes takes precedence over others. The first item in the collection represents the most preferred authentication scheme, the last item represents the ID of the least preferred one.

See Also:
Constant Field Values

COOKIE_POLICY

public static final java.lang.String COOKIE_POLICY
Defines the name of the cookie specification to be used for HTTP state management.

This parameter expects a value of type String.

See Also:
Constant Field Values

VIRTUAL_HOST

public static final java.lang.String VIRTUAL_HOST
Defines the virtual host name.

This parameter expects a value of type HttpHost.

See Also:
Constant Field Values

DEFAULT_HEADERS

public static final java.lang.String DEFAULT_HEADERS
Defines the request headers to be sent per default with each request.

This parameter expects a value of type Collection. The collection is expected to contain Headers.

See Also:
Constant Field Values

DEFAULT_HOST

public static final java.lang.String DEFAULT_HOST
Defines the default host. The default value will be used if the target host is not explicitly specified in the request URI.

This parameter expects a value of type HttpHost.

See Also:
Constant Field Values

DEFAULT_PROXY

public static final java.lang.String DEFAULT_PROXY
Defines the default proxy. The default value will be used if the proxy information is not explicitly specified in the request route.

This parameter expects a value of type HttpHost.

See Also:
Constant Field Values
Method Detail

getConnectionManagerTimeout

public static long getConnectionManagerTimeout(org.apache.http.params.HttpParams params)
Returns the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.

Returns:
timeout in milliseconds.

setConnectionManagerTimeout

public static void setConnectionManagerTimeout(org.apache.http.params.HttpParams params,
                                               long timeout)
Sets the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.

Parameters:
timeout - the timeout in milliseconds

isRedirecting

public static boolean isRedirecting(org.apache.http.params.HttpParams params)

setRedirecting

public static void setRedirecting(org.apache.http.params.HttpParams params,
                                  boolean value)

isAuthenticating

public static boolean isAuthenticating(org.apache.http.params.HttpParams params)

setAuthenticating

public static void setAuthenticating(org.apache.http.params.HttpParams params,
                                     boolean value)

isAuthenticationPreemptive

public static boolean isAuthenticationPreemptive(org.apache.http.params.HttpParams params)
Returns true if authentication should be attempted preemptively, false otherwise.

Returns:
true if authentication should be attempted preemptively, false otherwise.

setAuthenticationPreemptive

public static void setAuthenticationPreemptive(org.apache.http.params.HttpParams params,
                                               boolean value)
Sets whether authentication should be attempted preemptively.

Parameters:
value - true if authentication should be attempted preemptively, false otherwise.

getCookiePolicy

public static java.lang.String getCookiePolicy(org.apache.http.params.HttpParams params)

setCookiePolicy

public static void setCookiePolicy(org.apache.http.params.HttpParams params,
                                   java.lang.String cookiePolicy)


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.