org.apache.http.impl.client
Class DefaultHttpClient

java.lang.Object
  extended by org.apache.http.impl.client.AbstractHttpClient
      extended by org.apache.http.impl.client.DefaultHttpClient
All Implemented Interfaces:
HttpClient

@ThreadSafe
public class DefaultHttpClient
extends AbstractHttpClient

Default implementation of AbstractHttpClient.

This class creates an instance of SingleClientConnManager for connection management if not explicitly set.

This class creates the following chain of protocol interceptors per default:

This class sets up the following parameters if not explicitly set:

The following parameters can be used to customize the behavior of this class:

Since:
4.0

Constructor Summary
DefaultHttpClient()
           
DefaultHttpClient(ClientConnectionManager conman, HttpParams params)
          Creates a new HTTP client from parameters and a connection manager.
DefaultHttpClient(HttpParams params)
           
 
Method Summary
protected  AuthSchemeRegistry createAuthSchemeRegistry()
           
protected  ClientConnectionManager createClientConnectionManager()
           
protected  ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
           
protected  ConnectionReuseStrategy createConnectionReuseStrategy()
           
protected  CookieSpecRegistry createCookieSpecRegistry()
           
protected  CookieStore createCookieStore()
           
protected  CredentialsProvider createCredentialsProvider()
           
protected  HttpContext createHttpContext()
           
protected  HttpParams createHttpParams()
           
protected  BasicHttpProcessor createHttpProcessor()
           
protected  HttpRequestRetryHandler createHttpRequestRetryHandler()
           
protected  HttpRoutePlanner createHttpRoutePlanner()
           
protected  AuthenticationHandler createProxyAuthenticationHandler()
           
protected  RedirectHandler createRedirectHandler()
           
protected  HttpRequestExecutor createRequestExecutor()
           
protected  AuthenticationHandler createTargetAuthenticationHandler()
           
protected  UserTokenHandler createUserTokenHandler()
           
 
Methods inherited from class org.apache.http.impl.client.AbstractHttpClient
addRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, createClientRequestDirector, determineParams, execute, execute, execute, execute, execute, execute, execute, execute, getAuthSchemes, getConnectionKeepAliveStrategy, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getRedirectHandler, getRequestExecutor, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, getUserTokenHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setKeepAliveStrategy, setParams, setProxyAuthenticationHandler, setRedirectHandler, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler, setUserTokenHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHttpClient

public DefaultHttpClient(ClientConnectionManager conman,
                         HttpParams params)
Creates a new HTTP client from parameters and a connection manager.

Parameters:
params - the parameters
conman - the connection manager

DefaultHttpClient

public DefaultHttpClient(HttpParams params)

DefaultHttpClient

public DefaultHttpClient()
Method Detail

createHttpParams

protected HttpParams createHttpParams()
Specified by:
createHttpParams in class AbstractHttpClient

createRequestExecutor

protected HttpRequestExecutor createRequestExecutor()
Specified by:
createRequestExecutor in class AbstractHttpClient

createClientConnectionManager

protected ClientConnectionManager createClientConnectionManager()
Specified by:
createClientConnectionManager in class AbstractHttpClient

createHttpContext

protected HttpContext createHttpContext()
Specified by:
createHttpContext in class AbstractHttpClient

createConnectionReuseStrategy

protected ConnectionReuseStrategy createConnectionReuseStrategy()
Specified by:
createConnectionReuseStrategy in class AbstractHttpClient

createConnectionKeepAliveStrategy

protected ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
Specified by:
createConnectionKeepAliveStrategy in class AbstractHttpClient

createAuthSchemeRegistry

protected AuthSchemeRegistry createAuthSchemeRegistry()
Specified by:
createAuthSchemeRegistry in class AbstractHttpClient

createCookieSpecRegistry

protected CookieSpecRegistry createCookieSpecRegistry()
Specified by:
createCookieSpecRegistry in class AbstractHttpClient

createHttpProcessor

protected BasicHttpProcessor createHttpProcessor()
Specified by:
createHttpProcessor in class AbstractHttpClient

createHttpRequestRetryHandler

protected HttpRequestRetryHandler createHttpRequestRetryHandler()
Specified by:
createHttpRequestRetryHandler in class AbstractHttpClient

createRedirectHandler

protected RedirectHandler createRedirectHandler()
Specified by:
createRedirectHandler in class AbstractHttpClient

createTargetAuthenticationHandler

protected AuthenticationHandler createTargetAuthenticationHandler()
Specified by:
createTargetAuthenticationHandler in class AbstractHttpClient

createProxyAuthenticationHandler

protected AuthenticationHandler createProxyAuthenticationHandler()
Specified by:
createProxyAuthenticationHandler in class AbstractHttpClient

createCookieStore

protected CookieStore createCookieStore()
Specified by:
createCookieStore in class AbstractHttpClient

createCredentialsProvider

protected CredentialsProvider createCredentialsProvider()
Specified by:
createCredentialsProvider in class AbstractHttpClient

createHttpRoutePlanner

protected HttpRoutePlanner createHttpRoutePlanner()
Specified by:
createHttpRoutePlanner in class AbstractHttpClient

createUserTokenHandler

protected UserTokenHandler createUserTokenHandler()
Specified by:
createUserTokenHandler in class AbstractHttpClient


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.