com.sun.jersey.client.apache4.config
Interface ApacheHttpClient4Config

All Superinterfaces:
ClientConfig, FeaturesAndProperties
All Known Implementing Classes:
DefaultApacheHttpClient4Config

public interface ApacheHttpClient4Config
extends ClientConfig

Configuration options specific to the Client API that utilizes ApacheHttpClient4 or ApacheHttpClient4Handler.

Author:
jorgeluisw@mac.com, Paul.Sandoz@Sun.Com, pavel.bucek@oracle.com

Field Summary
static java.lang.String PROPERTY_CONNECTION_MANAGER
          Connection Manager which will be used to create HttpClient.
static java.lang.String PROPERTY_CREDENTIALS_PROVIDER
          The credential provider that should be used to retrieve credentials from a user.
static java.lang.String PROPERTY_DISABLE_COOKIES
          A value of "false" indicates the client should handle cookies automatically using HttpClient's default cookie policy.
static java.lang.String PROPERTY_ENABLE_BUFFERING
          If true then chunk encoding will be disabled and entity will be buffered in the client in order to calculate the size of the entity.
static java.lang.String PROPERTY_HTTP_PARAMS
          Http parameters which will be used to create HttpClient.
static java.lang.String PROPERTY_PREEMPTIVE_BASIC_AUTHENTICATION
          A value of "true" indicates that a client should send an authentication request even before the server gives a 401 response.
static java.lang.String PROPERTY_PROXY_PASSWORD
          Password which will be used for proxy authentication.
static java.lang.String PROPERTY_PROXY_URI
          A value of a URI to configure the proxy host and proxy port to proxy HTTP requests and responses.
static java.lang.String PROPERTY_PROXY_USERNAME
          User name which will be used for proxy authentication.
 
Fields inherited from interface com.sun.jersey.api.client.config.ClientConfig
PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION, PROPERTY_CHUNKED_ENCODING_SIZE, PROPERTY_CONNECT_TIMEOUT, PROPERTY_FOLLOW_REDIRECTS, PROPERTY_READ_TIMEOUT, PROPERTY_THREADPOOL_SIZE
 
Fields inherited from interface com.sun.jersey.core.util.FeaturesAndProperties
FEATURE_DISABLE_XML_SECURITY, FEATURE_FORMATTED, FEATURE_PRE_1_4_PROVIDER_PRECEDENCE, FEATURE_XMLROOTELEMENT_PROCESSING
 
Method Summary
 
Methods inherited from interface com.sun.jersey.api.client.config.ClientConfig
getClasses, getPropertyAsFeature, getSingletons
 
Methods inherited from interface com.sun.jersey.core.util.FeaturesAndProperties
getFeature, getFeatures, getProperties, getProperty
 

Field Detail

PROPERTY_DISABLE_COOKIES

static final java.lang.String PROPERTY_DISABLE_COOKIES
A value of "false" indicates the client should handle cookies automatically using HttpClient's default cookie policy. A value of "true" will cause the client to ignore all cookies. The value MUST be an instance of Boolean. If the property is absent the default value is "false"

See Also:
Constant Field Values

PROPERTY_CREDENTIALS_PROVIDER

static final java.lang.String PROPERTY_CREDENTIALS_PROVIDER
The credential provider that should be used to retrieve credentials from a user. Credentials needed for proxy authentication are stored here as well. The value MUST be an instance of CredentialsProvider. If the property is absent a default provider will be used.

See Also:
Constant Field Values

PROPERTY_PREEMPTIVE_BASIC_AUTHENTICATION

static final java.lang.String PROPERTY_PREEMPTIVE_BASIC_AUTHENTICATION
A value of "true" indicates that a client should send an authentication request even before the server gives a 401 response. This property may only be set when constructing a ApacheHttpClient4 instance. The value MUST be an instance of Boolean. If the property is absent the default value is "false"

See Also:
Constant Field Values

PROPERTY_CONNECTION_MANAGER

static final java.lang.String PROPERTY_CONNECTION_MANAGER
Connection Manager which will be used to create HttpClient. The value MUST be an instance of ClientConnectionManager. If the property is absent a default Connection Manager will be used (org.apache.http.impl.conn.SingleClientConnManager). If you want to use this client in multi-threaded environment, be sure you override default value with org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager instance.

See Also:
Constant Field Values

PROPERTY_HTTP_PARAMS

static final java.lang.String PROPERTY_HTTP_PARAMS
Http parameters which will be used to create HttpClient. The value MUST be an instance of HttpParams. If the property is absent default http parameters will be used.

See Also:
Constant Field Values

PROPERTY_PROXY_URI

static final java.lang.String PROPERTY_PROXY_URI
A value of a URI to configure the proxy host and proxy port to proxy HTTP requests and responses. If the port component of the URI is absent then a default port of 8080 be selected. The value MUST be an instance of String or URI. If the property absent then no proxy will be utilized.

See Also:
Constant Field Values

PROPERTY_PROXY_USERNAME

static final java.lang.String PROPERTY_PROXY_USERNAME
User name which will be used for proxy authentication. The value MUST be an instance of String. If the property absent then no proxy authentication will be utilized.

See Also:
Constant Field Values

PROPERTY_PROXY_PASSWORD

static final java.lang.String PROPERTY_PROXY_PASSWORD
Password which will be used for proxy authentication. The value MUST be an instance of String. If the property absent then no proxy authentication will be utilized.

See Also:
Constant Field Values

PROPERTY_ENABLE_BUFFERING

static final java.lang.String PROPERTY_ENABLE_BUFFERING
If true then chunk encoding will be disabled and entity will be buffered in the client in order to calculate the size of the entity. When property is false then chunk encoding will be enabled. In that case the property ClientConfig.PROPERTY_CHUNKED_ENCODING_SIZE can be used to control the size of the chunk.

Note that the behaviour of the http client differs from the default client configuration in the way that the chunk encoding is enabled by default and must be disabled if needed. When entity buffering is enabled then the whole entity is buffered and might cause out of memory errors if the entity is too large.

Property must be of a Boolean type. Default value is false.

See Also:
Constant Field Values


Copyright © 2015 Oracle Corporation. All Rights Reserved.