|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.http.impl.client.AbstractHttpClient
org.apache.http.impl.client.DefaultHttpClient
@ThreadSafe public class DefaultHttpClient
Default implementation of HttpClient pre-configured for most common use scenarios.
This class creates the following chain of protocol interceptors per default:
RequestDefaultHeadersRequestContentRequestTargetHostRequestClientConnControlRequestUserAgentRequestExpectContinueRequestAddCookiesResponseProcessCookiesRequestTargetAuthenticationRequestProxyAuthenticationThis class sets up the following parameters if not explicitly set:
The following parameters can be used to customize the behavior of this class:
CoreProtocolPNames.PROTOCOL_VERSIONCoreProtocolPNames.STRICT_TRANSFER_ENCODINGCoreProtocolPNames.HTTP_ELEMENT_CHARSETCoreProtocolPNames.USE_EXPECT_CONTINUECoreProtocolPNames.WAIT_FOR_CONTINUECoreProtocolPNames.USER_AGENTCoreConnectionPNames.TCP_NODELAYCoreConnectionPNames.SO_TIMEOUTCoreConnectionPNames.SO_LINGERCoreConnectionPNames.SO_REUSEADDRCoreConnectionPNames.SOCKET_BUFFER_SIZECoreConnectionPNames.CONNECTION_TIMEOUTCoreConnectionPNames.MAX_LINE_LENGTHCoreConnectionPNames.MAX_HEADER_COUNTCoreConnectionPNames.STALE_CONNECTION_CHECKConnRoutePNames.FORCED_ROUTEConnRoutePNames.LOCAL_ADDRESSConnRoutePNames.DEFAULT_PROXYCookieSpecPNames.DATE_PATTERNSCookieSpecPNames.SINGLE_COOKIE_HEADERAuthPNames.CREDENTIAL_CHARSETClientPNames.COOKIE_POLICYClientPNames.HANDLE_AUTHENTICATIONClientPNames.HANDLE_REDIRECTSClientPNames.MAX_REDIRECTSClientPNames.ALLOW_CIRCULAR_REDIRECTSClientPNames.VIRTUAL_HOSTClientPNames.DEFAULT_HOSTClientPNames.DEFAULT_HEADERSClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME
| Constructor Summary | |
|---|---|
DefaultHttpClient()
|
|
DefaultHttpClient(org.apache.http.conn.ClientConnectionManager conman)
|
|
DefaultHttpClient(org.apache.http.conn.ClientConnectionManager conman,
org.apache.http.params.HttpParams params)
Creates a new HTTP client from parameters and a connection manager. |
|
DefaultHttpClient(org.apache.http.params.HttpParams params)
|
|
| Method Summary | |
|---|---|
protected org.apache.http.params.HttpParams |
createHttpParams()
Creates the default set of HttpParams by invoking setDefaultHttpParams(HttpParams) |
protected org.apache.http.protocol.BasicHttpProcessor |
createHttpProcessor()
|
static void |
setDefaultHttpParams(org.apache.http.params.HttpParams params)
Saves the default set of HttpParams in the provided parameter. |
| Methods inherited from class org.apache.http.impl.client.AbstractHttpClient |
|---|
addRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, createAuthSchemeRegistry, createClientConnectionManager, createClientRequestDirector, createClientRequestDirector, createConnectionKeepAliveStrategy, createConnectionReuseStrategy, createCookieSpecRegistry, createCookieStore, createCredentialsProvider, createHttpContext, createHttpRequestRetryHandler, createHttpRoutePlanner, createProxyAuthenticationHandler, createRedirectHandler, createRequestExecutor, createTargetAuthenticationHandler, createUserTokenHandler, determineParams, execute, execute, execute, execute, execute, execute, execute, execute, getAuthSchemes, getConnectionKeepAliveStrategy, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getRedirectHandler, getRedirectStrategy, getRequestExecutor, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, getUserTokenHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setKeepAliveStrategy, setParams, setProxyAuthenticationHandler, setRedirectHandler, setRedirectStrategy, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler, setUserTokenHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultHttpClient(org.apache.http.conn.ClientConnectionManager conman,
org.apache.http.params.HttpParams params)
params - the parametersconman - the connection managerpublic DefaultHttpClient(org.apache.http.conn.ClientConnectionManager conman)
public DefaultHttpClient(org.apache.http.params.HttpParams params)
public DefaultHttpClient()
| Method Detail |
|---|
protected org.apache.http.params.HttpParams createHttpParams()
setDefaultHttpParams(HttpParams)
createHttpParams in class org.apache.http.impl.client.AbstractHttpClientSyncBasicHttpParams with the defaults applied to it.public static void setDefaultHttpParams(org.apache.http.params.HttpParams params)
CoreProtocolPNames.PROTOCOL_VERSION: 1.1CoreProtocolPNames.HTTP_CONTENT_CHARSET: ISO-8859-1CoreConnectionPNames.TCP_NODELAY: trueCoreConnectionPNames.SOCKET_BUFFER_SIZE: 8192CoreProtocolPNames.USER_AGENT: Apache-HttpClient/
protected org.apache.http.protocol.BasicHttpProcessor createHttpProcessor()
createHttpProcessor in class org.apache.http.impl.client.AbstractHttpClient
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||