Top Description Fields Constructors Methods
org.apache.http.client.protocol

public Class HttpClientContext

extends HttpCoreContext
Class Inheritance
Imports
java.net.URI, java.util.List, org.apache.http.auth.AuthSchemeProvider, .AuthState, org.apache.http.client.AuthCache, .CookieStore, .CredentialsProvider, org.apache.http.client.config.RequestConfig, org.apache.http.config.Lookup, org.apache.http.conn.routing.HttpRoute, .RouteInfo, org.apache.http.cookie.CookieOrigin, .CookieSpec, .CookieSpecProvider, org.apache.http.protocol.BasicHttpContext, .HttpContext, .HttpCoreContext

Adaptor class that provides convenience type safe setters and getters for common HttpContext attributes used in the course of HTTP request execution.
Since
4.3

Field Summary

Modifier and TypeField and Description
public static final String
AUTH_CACHE

Attribute name of a org.apache.http.client.AuthCache object that represents the auth scheme cache.

public static final String
AUTHSCHEME_REGISTRY

Attribute name of a org.apache.http.config.Lookup object that represents the actual AuthSchemeProvider registry.

public static final String
COOKIESPEC_REGISTRY

Attribute name of a org.apache.http.config.Lookup object that represents the actual CookieSpecProvider registry.

public static final String
CREDS_PROVIDER

Attribute name of a org.apache.http.client.CredentialsProvider object that represents the actual credentials provider.

public static final String
HTTP_ROUTE

Attribute name of a org.apache.http.conn.routing.RouteInfo object that represents the actual connection route.

public static final String
PROXY_AUTH_STATE

Attribute name of a org.apache.http.auth.AuthState object that represents the actual proxy authentication state.

public static final String
REDIRECT_LOCATIONS

Attribute name of a List object that represents a collection of all redirect locations received in the process of request execution.

public static final String
REQUEST_CONFIG

Attribute name of a org.apache.http.client.config.RequestConfig object that represents the actual request configuration.

public static final String
TARGET_AUTH_STATE

Attribute name of a org.apache.http.auth.AuthState object that represents the actual target authentication state.

public static final String
USER_TOKEN

Attribute name of a java.lang.Object object that represents the actual user identity such as user java.security.Principal.

Inherited from org.apache.http.protocol.HttpCoreContext:
HTTP_CONNECTIONHTTP_REQ_SENTHTTP_REQUESTHTTP_RESPONSEHTTP_TARGET_HOST

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public static HttpClientContext
public static HttpClientContext
public AuthCache
public Lookup<AuthSchemeProvider>
public CookieOrigin
public CookieSpec
public Lookup<CookieSpecProvider>
public CookieStore
public CredentialsProvider
public RouteInfo
private <T> Lookup<T>
getLookup(final String name, final Class<T> clazz)

public AuthState
public List<URI>
public RequestConfig
public AuthState
public <T> T
getUserToken(final Class<T> clazz)

public Object
public void
setAuthCache(final AuthCache authCache)

public void
public void
public void
setCookieStore(final CookieStore cookieStore)

public void
setCredentialsProvider(final CredentialsProvider credentialsProvider)

public void
public void
setUserToken(final Object obj)

Inherited from org.apache.http.protocol.HttpCoreContext:
getAttributegetAttributegetConnectiongetConnectiongetRequestgetResponsegetTargetHostisRequestSentremoveAttributesetAttributesetTargetHost

Field Detail

AUTH_CACHEback to summary
public static final String AUTH_CACHE

Attribute name of a org.apache.http.client.AuthCache object that represents the auth scheme cache.

AUTHSCHEME_REGISTRYback to summary
public static final String AUTHSCHEME_REGISTRY

Attribute name of a org.apache.http.config.Lookup object that represents the actual AuthSchemeProvider registry.

COOKIESPEC_REGISTRYback to summary
public static final String COOKIESPEC_REGISTRY

Attribute name of a org.apache.http.config.Lookup object that represents the actual CookieSpecProvider registry.

CREDS_PROVIDERback to summary
public static final String CREDS_PROVIDER

Attribute name of a org.apache.http.client.CredentialsProvider object that represents the actual credentials provider.

HTTP_ROUTEback to summary
public static final String HTTP_ROUTE

Attribute name of a org.apache.http.conn.routing.RouteInfo object that represents the actual connection route.

PROXY_AUTH_STATEback to summary
public static final String PROXY_AUTH_STATE

Attribute name of a org.apache.http.auth.AuthState object that represents the actual proxy authentication state.

REDIRECT_LOCATIONSback to summary
public static final String REDIRECT_LOCATIONS

Attribute name of a List object that represents a collection of all redirect locations received in the process of request execution.

REQUEST_CONFIGback to summary
public static final String REQUEST_CONFIG

Attribute name of a org.apache.http.client.config.RequestConfig object that represents the actual request configuration.

TARGET_AUTH_STATEback to summary
public static final String TARGET_AUTH_STATE

Attribute name of a org.apache.http.auth.AuthState object that represents the actual target authentication state.

USER_TOKENback to summary
public static final String USER_TOKEN

Attribute name of a java.lang.Object object that represents the actual user identity such as user java.security.Principal.

Constructor Detail

HttpClientContextback to summary
public HttpClientContext(final HttpContext context)
HttpClientContextback to summary
public HttpClientContext()

Method Detail

adaptback to summary
public static HttpClientContext adapt(final HttpContext context)

Hides org.apache.http.protocol.HttpCoreContext.adapt.

createback to summary
public static HttpClientContext create()

Hides org.apache.http.protocol.HttpCoreContext.create.

getAuthCacheback to summary
public AuthCache getAuthCache()
getAuthSchemeRegistryback to summary
public Lookup<AuthSchemeProvider> getAuthSchemeRegistry()
getCookieOriginback to summary
public CookieOrigin getCookieOrigin()
getCookieSpecback to summary
public CookieSpec getCookieSpec()
getCookieSpecRegistryback to summary
public Lookup<CookieSpecProvider> getCookieSpecRegistry()
getCookieStoreback to summary
public CookieStore getCookieStore()
getCredentialsProviderback to summary
public CredentialsProvider getCredentialsProvider()
getHttpRouteback to summary
public RouteInfo getHttpRoute()
getLookupback to summary
private <T> Lookup<T> getLookup(final String name, final Class<T> clazz)
Annotations
@SuppressWarnings:unchecked
getProxyAuthStateback to summary
public AuthState getProxyAuthState()
getRedirectLocationsback to summary
public List<URI> getRedirectLocations()
Annotations
@SuppressWarnings:unchecked
getRequestConfigback to summary
public RequestConfig getRequestConfig()
getTargetAuthStateback to summary
public AuthState getTargetAuthState()
getUserTokenback to summary
public <T> T getUserToken(final Class<T> clazz)
getUserTokenback to summary
public Object getUserToken()
setAuthCacheback to summary
public void setAuthCache(final AuthCache authCache)
setAuthSchemeRegistryback to summary
public void setAuthSchemeRegistry(final Lookup<AuthSchemeProvider> lookup)
setCookieSpecRegistryback to summary
public void setCookieSpecRegistry(final Lookup<CookieSpecProvider> lookup)
setCookieStoreback to summary
public void setCookieStore(final CookieStore cookieStore)
setCredentialsProviderback to summary
public void setCredentialsProvider(final CredentialsProvider credentialsProvider)
setRequestConfigback to summary
public void setRequestConfig(final RequestConfig config)
setUserTokenback to summary
public void setUserToken(final Object obj)