Class HttpClientContext
java.lang.Object
org.apache.hc.core5.http.protocol.HttpCoreContext
org.apache.hc.client5.http.protocol.HttpClientContext
- All Implemented Interfaces:
org.apache.hc.core5.http.protocol.HttpContext
- Direct Known Subclasses:
HttpCacheContext
public class HttpClientContext
extends org.apache.hc.core5.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
FieldsModifier and TypeFieldDescriptionstatic final StringAttribute name of aAuthCacheobject that represents the auth scheme cache.static final StringAttribute name of a map containing actualAuthExchanges keyed by their respectiveHttpHost.static final StringAttribute name of aLookupobject that represents the actualAuthSchemeFactoryregistry.static final StringAttribute name of aCookieOriginobject that represents the actual details of the origin server.static final StringAttribute name of aCookieSpecobject that represents the actual cookie specification.static final StringAttribute name of aCookieStoreobject that represents the actual cookie store.static final StringAttribute name of aLookupobject that represents the actualCookieSpecFactoryregistry.static final StringAttribute name of aCredentialsProviderobject that represents the actual credentials provider.static final StringAttribute name of aStringobject that represents the ID of the current message exchange.static final StringAttribute name of aRouteInfoobject that represents the actual connection route.static final StringAttribute name of aRedirectLocationsobject that represents a collection of all redirect locations received in the process of request execution.static final StringAttribute name of aRequestConfigobject that represents the actual request configuration.static final StringFields inherited from class org.apache.hc.core5.http.protocol.HttpCoreContext
CONNECTION_ENDPOINT, HTTP_REQUEST, HTTP_RESPONSE, SSL_SESSIONFields inherited from interface org.apache.hc.core5.http.protocol.HttpContext
RESERVED_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClientContextadapt(org.apache.hc.core5.http.protocol.HttpContext context) static HttpClientContextcreate()getAuthExchange(org.apache.hc.core5.http.HttpHost host) Map<org.apache.hc.core5.http.HttpHost, AuthExchange> org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> private <T> org.apache.hc.core5.http.config.Lookup<T> <T> TgetUserToken(Class<T> clazz) voidresetAuthExchange(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme) voidsetAuthCache(AuthCache authCache) voidsetAuthExchange(org.apache.hc.core5.http.HttpHost host, AuthExchange authExchange) voidsetAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> lookup) voidsetCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> lookup) voidsetCookieStore(CookieStore cookieStore) voidsetCredentialsProvider(CredentialsProvider credentialsProvider) voidsetExchangeId(String id) voidsetRequestConfig(RequestConfig config) voidsetUserToken(Object obj) Methods inherited from class org.apache.hc.core5.http.protocol.HttpCoreContext
getAttribute, getAttribute, getEndpointDetails, getProtocolVersion, getRequest, getResponse, getSSLSession, removeAttribute, setAttribute, setProtocolVersion, toString
-
Field Details
-
HTTP_ROUTE
-
REDIRECT_LOCATIONS
Attribute name of aRedirectLocationsobject that represents a collection of all redirect locations received in the process of request execution.- See Also:
-
COOKIESPEC_REGISTRY
Attribute name of aLookupobject that represents the actualCookieSpecFactoryregistry.- See Also:
-
COOKIE_SPEC
Attribute name of aCookieSpecobject that represents the actual cookie specification.- See Also:
-
COOKIE_ORIGIN
Attribute name of aCookieOriginobject that represents the actual details of the origin server.- See Also:
-
COOKIE_STORE
Attribute name of aCookieStoreobject that represents the actual cookie store.- See Also:
-
CREDS_PROVIDER
Attribute name of aCredentialsProviderobject that represents the actual credentials provider.- See Also:
-
AUTH_CACHE
-
AUTH_EXCHANGE_MAP
Attribute name of a map containing actualAuthExchanges keyed by their respectiveHttpHost.- See Also:
-
USER_TOKEN
-
AUTHSCHEME_REGISTRY
Attribute name of aLookupobject that represents the actualAuthSchemeFactoryregistry.- See Also:
-
REQUEST_CONFIG
Attribute name of aRequestConfigobject that represents the actual request configuration.- See Also:
-
EXCHANGE_ID
-
-
Constructor Details
-
HttpClientContext
public HttpClientContext(org.apache.hc.core5.http.protocol.HttpContext context) -
HttpClientContext
public HttpClientContext()
-
-
Method Details
-
adapt
-
create
-
getHttpRoute
-
getRedirectLocations
-
getCookieStore
-
setCookieStore
-
getCookieSpec
-
getCookieOrigin
-
getLookup
-
getCookieSpecRegistry
-
setCookieSpecRegistry
-
getAuthSchemeRegistry
-
setAuthSchemeRegistry
-
getCredentialsProvider
-
setCredentialsProvider
-
getAuthCache
-
setAuthCache
-
getAuthExchanges
- Since:
- 5.0
-
getAuthExchange
- Since:
- 5.0
-
setAuthExchange
- Since:
- 5.0
-
resetAuthExchange
- Since:
- 5.0
-
getUserToken
-
getUserToken
-
setUserToken
-
getRequestConfig
-
setRequestConfig
-
getExchangeId
- Since:
- 5.1
-
setExchangeId
- Since:
- 5.1
-