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 String
Attribute name of aAuthCache
object that represents the auth scheme cache.static final String
Attribute name of a map containing actualAuthExchange
s keyed by their respectiveHttpHost
.static final String
Attribute name of aLookup
object that represents the actualAuthSchemeFactory
registry.static final String
Attribute name of aCookieOrigin
object that represents the actual details of the origin server.static final String
Attribute name of aCookieSpec
object that represents the actual cookie specification.static final String
Attribute name of aCookieStore
object that represents the actual cookie store.static final String
Attribute name of aLookup
object that represents the actualCookieSpecFactory
registry.static final String
Attribute name of aCredentialsProvider
object that represents the actual credentials provider.static final String
Attribute name of aString
object that represents the ID of the current message exchange.static final String
Attribute name of aRouteInfo
object that represents the actual connection route.static final String
Attribute name of aRedirectLocations
object that represents a collection of all redirect locations received in the process of request execution.static final String
Attribute name of aRequestConfig
object that represents the actual request configuration.static final String
Fields inherited from class org.apache.hc.core5.http.protocol.HttpCoreContext
CONNECTION_ENDPOINT, HTTP_REQUEST, HTTP_RESPONSE, SSL_SESSION
Fields inherited from interface org.apache.hc.core5.http.protocol.HttpContext
RESERVED_PREFIX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClientContext
adapt
(org.apache.hc.core5.http.protocol.HttpContext context) static HttpClientContext
create()
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> T
getUserToken
(Class<T> clazz) void
resetAuthExchange
(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme) void
setAuthCache
(AuthCache authCache) void
setAuthExchange
(org.apache.hc.core5.http.HttpHost host, AuthExchange authExchange) void
setAuthSchemeRegistry
(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> lookup) void
setCookieSpecRegistry
(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> lookup) void
setCookieStore
(CookieStore cookieStore) void
setCredentialsProvider
(CredentialsProvider credentialsProvider) void
setExchangeId
(String id) void
setRequestConfig
(RequestConfig config) void
setUserToken
(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
Attribute name of aRouteInfo
object that represents the actual connection route.- See Also:
-
REDIRECT_LOCATIONS
Attribute name of aRedirectLocations
object that represents a collection of all redirect locations received in the process of request execution.- See Also:
-
COOKIESPEC_REGISTRY
Attribute name of aLookup
object that represents the actualCookieSpecFactory
registry.- See Also:
-
COOKIE_SPEC
Attribute name of aCookieSpec
object that represents the actual cookie specification.- See Also:
-
COOKIE_ORIGIN
Attribute name of aCookieOrigin
object that represents the actual details of the origin server.- See Also:
-
COOKIE_STORE
Attribute name of aCookieStore
object that represents the actual cookie store.- See Also:
-
CREDS_PROVIDER
Attribute name of aCredentialsProvider
object that represents the actual credentials provider.- See Also:
-
AUTH_CACHE
Attribute name of aAuthCache
object that represents the auth scheme cache.- See Also:
-
AUTH_EXCHANGE_MAP
Attribute name of a map containing actualAuthExchange
s keyed by their respectiveHttpHost
.- See Also:
-
USER_TOKEN
- See Also:
-
AUTHSCHEME_REGISTRY
Attribute name of aLookup
object that represents the actualAuthSchemeFactory
registry.- See Also:
-
REQUEST_CONFIG
Attribute name of aRequestConfig
object that represents the actual request configuration.- See Also:
-
EXCHANGE_ID
Attribute name of aString
object that represents the ID of the current message exchange.- See Also:
-
-
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
-