org.apache.http.impl.client
Class DefaultHttpClient
java.lang.Object
org.apache.http.impl.client.AbstractHttpClient
org.apache.http.impl.client.DefaultHttpClient
- All Implemented Interfaces:
- HttpClient, org.apache.http.protocol.HttpRequestInterceptorList, org.apache.http.protocol.HttpResponseInterceptorList
public class DefaultHttpClient
- extends AbstractHttpClient
Default implementation of an HTTP client.
This class replaces HttpClient
in HttpClient 3.
- Since:
- 4.0
- Version:
- $Revision: 585984 $
- Author:
- Roland Weber, Oleg Kalnichevski
Methods inherited from class org.apache.http.impl.client.AbstractHttpClient |
addRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, determineParams, execute, execute, execute, execute, getAuthSchemes, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getDefaultContext, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getRedirectHandler, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setInterceptors, setParams, setProxyAuthenticationHandler, setRedirectHandler, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultHttpClient
public DefaultHttpClient(ClientConnectionManager conman,
org.apache.http.params.HttpParams params)
- Creates a new HTTP client from parameters and a connection manager.
- Parameters:
params
- the parametersconman
- the connection manager
DefaultHttpClient
public DefaultHttpClient(org.apache.http.params.HttpParams params)
DefaultHttpClient
public DefaultHttpClient()
createHttpParams
protected org.apache.http.params.HttpParams createHttpParams()
- Specified by:
createHttpParams
in class AbstractHttpClient
createClientConnectionManager
protected ClientConnectionManager createClientConnectionManager()
- Specified by:
createClientConnectionManager
in class AbstractHttpClient
createHttpContext
protected org.apache.http.protocol.HttpContext createHttpContext()
- Specified by:
createHttpContext
in class AbstractHttpClient
createConnectionReuseStrategy
protected org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy()
- Specified by:
createConnectionReuseStrategy
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 org.apache.http.protocol.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
populateContext
protected void populateContext(org.apache.http.protocol.HttpContext context)
- Specified by:
populateContext
in class AbstractHttpClient
determineRoute
protected RoutedRequest determineRoute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.protocol.HttpContext context)
throws org.apache.http.HttpException
- Description copied from class:
AbstractHttpClient
- Determines the route for a request.
Called by
execute(urirequest, context)
to map to execute(roureq, context)
.
- Specified by:
determineRoute
in class AbstractHttpClient
- Parameters:
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executecontext
- the context to use for the execution,
never null
- Returns:
- the request along with the route it should take
- Throws:
org.apache.http.HttpException
- in case of a problem
createHttpRoutePlanner
protected HttpRoutePlanner createHttpRoutePlanner()
- Specified by:
createHttpRoutePlanner
in class AbstractHttpClient
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.