Package org.apache.http.client.protocol
Class HttpClientContext
- java.lang.Object
-
- org.apache.http.protocol.HttpCoreContext
-
- org.apache.http.client.protocol.HttpClientContext
-
- All Implemented Interfaces:
HttpContext
- Direct Known Subclasses:
HttpCacheContext
public class HttpClientContext extends HttpCoreContext
Adaptor class that provides convenience type safe setters and getters for commonHttpContextattributes used in the course of HTTP request execution.- Since:
- 4.3
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAUTH_CACHEAttribute name of aAuthCacheobject that represents the auth scheme cache.static java.lang.StringAUTHSCHEME_REGISTRYAttribute name of aLookupobject that represents the actualAuthSchemeProviderregistry.static java.lang.StringCOOKIE_ORIGINAttribute name of aCookieOriginobject that represents the actual details of the origin server.static java.lang.StringCOOKIE_SPECAttribute name of aCookieSpecobject that represents the actual cookie specification.static java.lang.StringCOOKIE_STOREAttribute name of aCookieStoreobject that represents the actual cookie store.static java.lang.StringCOOKIESPEC_REGISTRYAttribute name of aLookupobject that represents the actualCookieSpecProviderregistry.static java.lang.StringCREDS_PROVIDERAttribute name of aCredentialsProviderobject that represents the actual credentials provider.static java.lang.StringHTTP_ROUTEAttribute name of aRouteInfoobject that represents the actual connection route.static java.lang.StringPROXY_AUTH_STATEAttribute name of aAuthStateobject that represents the actual proxy authentication state.static java.lang.StringREDIRECT_LOCATIONSAttribute name of aListobject that represents a collection of all redirect locations received in the process of request execution.static java.lang.StringREQUEST_CONFIGAttribute name of aRequestConfigobject that represents the actual request configuration.static java.lang.StringTARGET_AUTH_STATEAttribute name of aAuthStateobject that represents the actual target authentication state.static java.lang.StringUSER_TOKENAttribute name of aObjectobject that represents the actual user identity such as userPrincipal.-
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
Constructors Constructor Description HttpClientContext()HttpClientContext(HttpContext context)
-
Method Summary
-
Methods inherited from class org.apache.http.protocol.HttpCoreContext
getAttribute, getAttribute, getConnection, getConnection, getRequest, getResponse, getTargetHost, isRequestSent, removeAttribute, setAttribute, setTargetHost
-
-
-
-
Field Detail
-
HTTP_ROUTE
public static final java.lang.String HTTP_ROUTE
Attribute name of aRouteInfoobject that represents the actual connection route.- See Also:
- Constant Field Values
-
REDIRECT_LOCATIONS
public static final java.lang.String REDIRECT_LOCATIONS
Attribute name of aListobject 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 java.lang.String COOKIESPEC_REGISTRY
Attribute name of aLookupobject that represents the actualCookieSpecProviderregistry.- See Also:
- Constant Field Values
-
COOKIE_SPEC
public static final java.lang.String COOKIE_SPEC
Attribute name of aCookieSpecobject that represents the actual cookie specification.- See Also:
- Constant Field Values
-
COOKIE_ORIGIN
public static final java.lang.String COOKIE_ORIGIN
Attribute name of aCookieOriginobject that represents the actual details of the origin server.- See Also:
- Constant Field Values
-
COOKIE_STORE
public static final java.lang.String COOKIE_STORE
Attribute name of aCookieStoreobject that represents the actual cookie store.- See Also:
- Constant Field Values
-
CREDS_PROVIDER
public static final java.lang.String CREDS_PROVIDER
Attribute name of aCredentialsProviderobject that represents the actual credentials provider.- See Also:
- Constant Field Values
-
AUTH_CACHE
public static final java.lang.String AUTH_CACHE
Attribute name of aAuthCacheobject that represents the auth scheme cache.- See Also:
- Constant Field Values
-
TARGET_AUTH_STATE
public static final java.lang.String TARGET_AUTH_STATE
Attribute name of aAuthStateobject that represents the actual target authentication state.- See Also:
- Constant Field Values
-
PROXY_AUTH_STATE
public static final java.lang.String PROXY_AUTH_STATE
Attribute name of aAuthStateobject that represents the actual proxy authentication state.- See Also:
- Constant Field Values
-
USER_TOKEN
public static final java.lang.String USER_TOKEN
Attribute name of aObjectobject that represents the actual user identity such as userPrincipal.- See Also:
- Constant Field Values
-
AUTHSCHEME_REGISTRY
public static final java.lang.String AUTHSCHEME_REGISTRY
Attribute name of aLookupobject that represents the actualAuthSchemeProviderregistry.- See Also:
- Constant Field Values
-
REQUEST_CONFIG
public static final java.lang.String REQUEST_CONFIG
Attribute name of aRequestConfigobject that represents the actual request configuration.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpClientContext
public HttpClientContext(HttpContext context)
-
HttpClientContext
public HttpClientContext()
-
-
Method Detail
-
adapt
public static HttpClientContext adapt(HttpContext context)
-
create
public static HttpClientContext create()
-
getHttpRoute
public RouteInfo getHttpRoute()
-
getRedirectLocations
public java.util.List<java.net.URI> getRedirectLocations()
-
getCookieStore
public CookieStore getCookieStore()
-
setCookieStore
public void setCookieStore(CookieStore cookieStore)
-
getCookieSpec
public CookieSpec getCookieSpec()
-
getCookieOrigin
public CookieOrigin getCookieOrigin()
-
getCookieSpecRegistry
public Lookup<CookieSpecProvider> getCookieSpecRegistry()
-
setCookieSpecRegistry
public void setCookieSpecRegistry(Lookup<CookieSpecProvider> lookup)
-
getAuthSchemeRegistry
public Lookup<AuthSchemeProvider> getAuthSchemeRegistry()
-
setAuthSchemeRegistry
public void setAuthSchemeRegistry(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(java.lang.Class<T> clazz)
-
getUserToken
public java.lang.Object getUserToken()
-
setUserToken
public void setUserToken(java.lang.Object obj)
-
getRequestConfig
public RequestConfig getRequestConfig()
-
setRequestConfig
public void setRequestConfig(RequestConfig config)
-
-