org.apache.http.client.protocol
Class HttpClientContext

java.lang.Object
  extended by org.apache.http.protocol.HttpCoreContext
      extended by org.apache.http.client.protocol.HttpClientContext
All Implemented Interfaces:
org.apache.http.protocol.HttpContext

public class HttpClientContext
extends org.apache.http.protocol.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
static String AUTH_CACHE
          Attribute name of a AuthCache object that represents the auth scheme cache.
static String AUTHSCHEME_REGISTRY
          Attribute name of a Lookup object that represents the actual AuthSchemeProvider registry.
static String COOKIE_ORIGIN
          Attribute name of a CookieOrigin object that represents the actual details of the origin server.
static String COOKIE_SPEC
          Attribute name of a CookieSpec object that represents the actual cookie specification.
static String COOKIE_STORE
          Attribute name of a CookieStore object that represents the actual cookie store.
static String COOKIESPEC_REGISTRY
          Attribute name of a Lookup object that represents the actual CookieSpecProvider registry.
static String CREDS_PROVIDER
          Attribute name of a CredentialsProvider object that represents the actual credentials provider.
static String HTTP_ROUTE
          Attribute name of a RouteInfo object that represents the actual connection route.
static String PROXY_AUTH_STATE
          Attribute name of a AuthState object that represents the actual proxy authentication state.
static String REDIRECT_LOCATIONS
          Attribute name of a List object that represents a collection of all redirect locations received in the process of request execution.
static String REQUEST_CONFIG
          Attribute name of a RequestConfig object that represents the actual request configuration.
static String TARGET_AUTH_STATE
          Attribute name of a AuthState object that represents the actual target authentication state.
static String USER_TOKEN
          Attribute name of a Object object that represents the actual user identity such as user Principal.
 
Fields inherited from class org.apache.http.protocol.HttpCoreContext
HTTP_CONNECTION, HTTP_REQ_SENT, HTTP_REQUEST, HTTP_RESPONSE, HTTP_TARGET_HOST
 
Fields inherited from interface org.apache.http.protocol.HttpContext
RESERVED_PREFIX
 
Constructor Summary
HttpClientContext()
           
HttpClientContext(org.apache.http.protocol.HttpContext context)
           
 
Method Summary
static HttpClientContext adapt(org.apache.http.protocol.HttpContext context)
           
static HttpClientContext create()
           
 AuthCache getAuthCache()
           
 org.apache.http.config.Lookup<AuthSchemeProvider> getAuthSchemeRegistry()
           
 CookieOrigin getCookieOrigin()
           
 CookieSpec getCookieSpec()
           
 org.apache.http.config.Lookup<CookieSpecProvider> getCookieSpecRegistry()
           
 CookieStore getCookieStore()
           
 CredentialsProvider getCredentialsProvider()
           
 RouteInfo getHttpRoute()
           
 AuthState getProxyAuthState()
           
 List<URI> getRedirectLocations()
           
 RequestConfig getRequestConfig()
           
 AuthState getTargetAuthState()
           
 Object getUserToken()
           
<T> T
getUserToken(Class<T> clazz)
           
 void setAuthCache(AuthCache authCache)
           
 void setAuthSchemeRegistry(org.apache.http.config.Lookup<AuthSchemeProvider> lookup)
           
 void setCookieSpecRegistry(org.apache.http.config.Lookup<CookieSpecProvider> lookup)
           
 void setCookieStore(CookieStore cookieStore)
           
 void setCredentialsProvider(CredentialsProvider credentialsProvider)
           
 void setRequestConfig(RequestConfig config)
           
 void setUserToken(Object obj)
           
 
Methods inherited from class org.apache.http.protocol.HttpCoreContext
getAttribute, getAttribute, getConnection, getConnection, getRequest, getResponse, getTargetHost, isRequestSent, removeAttribute, setAttribute, setTargetHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_ROUTE

public static final String HTTP_ROUTE
Attribute name of a RouteInfo object that represents the actual connection route.

See Also:
Constant Field Values

REDIRECT_LOCATIONS

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.

See Also:
Constant Field Values

COOKIESPEC_REGISTRY

public static final String COOKIESPEC_REGISTRY
Attribute name of a Lookup object that represents the actual CookieSpecProvider registry.

See Also:
Constant Field Values

COOKIE_SPEC

public static final String COOKIE_SPEC
Attribute name of a CookieSpec object that represents the actual cookie specification.

See Also:
Constant Field Values

COOKIE_ORIGIN

public static final String COOKIE_ORIGIN
Attribute name of a CookieOrigin object that represents the actual details of the origin server.

See Also:
Constant Field Values

COOKIE_STORE

public static final String COOKIE_STORE
Attribute name of a CookieStore object that represents the actual cookie store.

See Also:
Constant Field Values

CREDS_PROVIDER

public static final String CREDS_PROVIDER
Attribute name of a CredentialsProvider object that represents the actual credentials provider.

See Also:
Constant Field Values

AUTH_CACHE

public static final String AUTH_CACHE
Attribute name of a AuthCache object that represents the auth scheme cache.

See Also:
Constant Field Values

TARGET_AUTH_STATE

public static final String TARGET_AUTH_STATE
Attribute name of a AuthState object that represents the actual target authentication state.

See Also:
Constant Field Values

PROXY_AUTH_STATE

public static final String PROXY_AUTH_STATE
Attribute name of a AuthState object that represents the actual proxy authentication state.

See Also:
Constant Field Values

USER_TOKEN

public static final String USER_TOKEN
Attribute name of a Object object that represents the actual user identity such as user Principal.

See Also:
Constant Field Values

AUTHSCHEME_REGISTRY

public static final String AUTHSCHEME_REGISTRY
Attribute name of a Lookup object that represents the actual AuthSchemeProvider registry.

See Also:
Constant Field Values

REQUEST_CONFIG

public static final String REQUEST_CONFIG
Attribute name of a RequestConfig object that represents the actual request configuration.

See Also:
Constant Field Values
Constructor Detail

HttpClientContext

public HttpClientContext(org.apache.http.protocol.HttpContext context)

HttpClientContext

public HttpClientContext()
Method Detail

adapt

public static HttpClientContext adapt(org.apache.http.protocol.HttpContext context)

create

public static HttpClientContext create()

getHttpRoute

public RouteInfo getHttpRoute()

getRedirectLocations

public List<URI> getRedirectLocations()

getCookieStore

public CookieStore getCookieStore()

setCookieStore

public void setCookieStore(CookieStore cookieStore)

getCookieSpec

public CookieSpec getCookieSpec()

getCookieOrigin

public CookieOrigin getCookieOrigin()

getCookieSpecRegistry

public org.apache.http.config.Lookup<CookieSpecProvider> getCookieSpecRegistry()

setCookieSpecRegistry

public void setCookieSpecRegistry(org.apache.http.config.Lookup<CookieSpecProvider> lookup)

getAuthSchemeRegistry

public org.apache.http.config.Lookup<AuthSchemeProvider> getAuthSchemeRegistry()

setAuthSchemeRegistry

public void setAuthSchemeRegistry(org.apache.http.config.Lookup<AuthSchemeProvider> lookup)

getCredentialsProvider

public CredentialsProvider getCredentialsProvider()

setCredentialsProvider

public void setCredentialsProvider(CredentialsProvider credentialsProvider)

getAuthCache

public AuthCache getAuthCache()

setAuthCache

public void setAuthCache(AuthCache authCache)

getTargetAuthState

public AuthState getTargetAuthState()

getProxyAuthState

public AuthState getProxyAuthState()

getUserToken

public <T> T getUserToken(Class<T> clazz)

getUserToken

public Object getUserToken()

setUserToken

public void setUserToken(Object obj)

getRequestConfig

public RequestConfig getRequestConfig()

setRequestConfig

public void setRequestConfig(RequestConfig config)


Copyright © 1999–2019 The Apache Software Foundation. All rights reserved.