Class HttpCacheContext.Delegate
- java.lang.Object
-
- org.apache.hc.core5.http.protocol.HttpCoreContext
-
- org.apache.hc.client5.http.protocol.HttpClientContext
-
- org.apache.hc.client5.http.cache.HttpCacheContext
-
- org.apache.hc.client5.http.cache.HttpCacheContext.Delegate
-
- All Implemented Interfaces:
org.apache.hc.core5.http.protocol.HttpContext
- Enclosing class:
- HttpCacheContext
@Internal static class HttpCacheContext.Delegate extends HttpCacheContext
Internal adaptor class that delegates all its method calls toHttpClientContext. To be removed in the future.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.hc.client5.http.cache.HttpCacheContext
HttpCacheContext.Delegate
-
-
Field Summary
Fields Modifier and Type Field Description private HttpClientContextclientContext-
Fields inherited from class org.apache.hc.client5.http.cache.HttpCacheContext
CACHE_ENTRY, CACHE_RESPONSE_STATUS, REQUEST_CACHE_CONTROL, RESPONSE_CACHE_CONTROL
-
Fields inherited from class org.apache.hc.client5.http.protocol.HttpClientContext
AUTH_CACHE, AUTH_EXCHANGE_MAP, AUTHSCHEME_REGISTRY, COOKIE_ORIGIN, COOKIE_SPEC, COOKIE_STORE, COOKIESPEC_REGISTRY, CREDS_PROVIDER, EXCHANGE_ID, HTTP_ROUTE, REDIRECT_LOCATIONS, REQUEST_CONFIG, USER_TOKEN
-
-
Constructor Summary
Constructors Constructor Description Delegate(HttpClientContext clientContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAttribute(java.lang.String id)<T> TgetAttribute(java.lang.String id, java.lang.Class<T> clazz)AuthCachegetAuthCache()Represents aAuthCacheused in the context of the request execution.AuthExchangegetAuthExchange(org.apache.hc.core5.http.HttpHost host)java.util.Map<org.apache.hc.core5.http.HttpHost,AuthExchange>getAuthExchanges()Represents a map ofAuthExchanges performed in the context of the request execution.org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory>getAuthSchemeRegistry()Represents aAuthSchemeFactoryregistry used in the context of the request execution.HttpCacheEntrygetCacheEntry()Represents the cache entry the resource of which has been used to generate the response.CacheResponseStatusgetCacheResponseStatus()Represents an outcome of the cache operation and the way the response has been generated.CookieOrigingetCookieOrigin()Represents aCookieOriginproduced in the context of request execution.CookieSpecgetCookieSpec()Represents aCookieSpecchosen in the context of request execution.org.apache.hc.core5.http.config.Lookup<CookieSpecFactory>getCookieSpecRegistry()Represents aCookieSpecFactoryregistry used in the context of the request execution.CookieStoregetCookieStore()Represents aCookieStoreused in the context of the request execution.CredentialsProvidergetCredentialsProvider()Represents aCredentialsProviderregistry used in the context of the request execution.org.apache.hc.core5.http.EndpointDetailsgetEndpointDetails()java.lang.StringgetExchangeId()Represents an identifier generated for the current message exchange executed in the given context.RouteInfogetHttpRoute()Represents current route used to execute message exchanges.org.apache.hc.core5.http.ProtocolVersiongetProtocolVersion()RedirectLocationsgetRedirectLocations()Represents a collection of all redirects executed in the context of request execution.org.apache.hc.core5.http.HttpRequestgetRequest()RequestCacheControlgetRequestCacheControl()Represents cache control requested by the client.RequestConfiggetRequestConfig()Represents anusedin the context of the request execution.org.apache.hc.core5.http.HttpResponsegetResponse()ResponseCacheControlgetResponseCacheControl()Represents cache control enforced by the server.javax.net.ssl.SSLSessiongetSSLSession()java.lang.ObjectgetUserToken()Represents an arbitrary user token that identifies the user in the context of the request execution.java.lang.ObjectremoveAttribute(java.lang.String id)voidresetAuthExchange(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme)java.lang.ObjectsetAttribute(java.lang.String id, java.lang.Object obj)voidsetAuthCache(AuthCache authCache)voidsetAuthExchange(org.apache.hc.core5.http.HttpHost host, AuthExchange authExchange)voidsetAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> lookup)voidsetCacheEntry(HttpCacheEntry cacheEntry)voidsetCacheResponseStatus(CacheResponseStatus responseStatus)voidsetCookieOrigin(CookieOrigin cookieOrigin)voidsetCookieSpec(CookieSpec cookieSpec)voidsetCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> lookup)voidsetCookieStore(CookieStore cookieStore)voidsetCredentialsProvider(CredentialsProvider credentialsProvider)voidsetEndpointDetails(org.apache.hc.core5.http.EndpointDetails endpointDetails)voidsetExchangeId(java.lang.String exchangeId)voidsetProtocolVersion(org.apache.hc.core5.http.ProtocolVersion version)voidsetRedirectLocations(RedirectLocations redirectLocations)voidsetRequest(org.apache.hc.core5.http.HttpRequest request)voidsetRequestCacheControl(RequestCacheControl requestCacheControl)voidsetRequestConfig(RequestConfig requestConfig)voidsetResponse(org.apache.hc.core5.http.HttpResponse response)voidsetResponseCacheControl(ResponseCacheControl responseCacheControl)voidsetRoute(HttpRoute route)voidsetSSLSession(javax.net.ssl.SSLSession sslSession)voidsetUserToken(java.lang.Object userToken)java.lang.StringtoString()-
Methods inherited from class org.apache.hc.client5.http.cache.HttpCacheContext
adapt, cast, castOrCreate, create, getRequestCacheControlOrDefault, getResponseCacheControlOrDefault
-
Methods inherited from class org.apache.hc.client5.http.protocol.HttpClientContext
getNextNonce, getRequestConfigOrDefault, getUserToken, setNextNonce
-
-
-
-
Field Detail
-
clientContext
private final HttpClientContext clientContext
-
-
Constructor Detail
-
Delegate
Delegate(HttpClientContext clientContext)
-
-
Method Detail
-
getCacheResponseStatus
public CacheResponseStatus getCacheResponseStatus()
Description copied from class:HttpCacheContextRepresents an outcome of the cache operation and the way the response has been generated.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getCacheResponseStatusin classHttpCacheContext
-
setCacheResponseStatus
public void setCacheResponseStatus(CacheResponseStatus responseStatus)
- Overrides:
setCacheResponseStatusin classHttpCacheContext
-
getRequestCacheControl
public RequestCacheControl getRequestCacheControl()
Description copied from class:HttpCacheContextRepresents cache control requested by the client.This context attribute is expected to be set by the caller.
- Overrides:
getRequestCacheControlin classHttpCacheContext
-
setRequestCacheControl
public void setRequestCacheControl(RequestCacheControl requestCacheControl)
- Overrides:
setRequestCacheControlin classHttpCacheContext
-
getResponseCacheControl
public ResponseCacheControl getResponseCacheControl()
Description copied from class:HttpCacheContextRepresents cache control enforced by the server.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getResponseCacheControlin classHttpCacheContext
-
setResponseCacheControl
public void setResponseCacheControl(ResponseCacheControl responseCacheControl)
- Overrides:
setResponseCacheControlin classHttpCacheContext
-
getCacheEntry
public HttpCacheEntry getCacheEntry()
Description copied from class:HttpCacheContextRepresents the cache entry the resource of which has been used to generate the response.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getCacheEntryin classHttpCacheContext
-
setCacheEntry
public void setCacheEntry(HttpCacheEntry cacheEntry)
- Overrides:
setCacheEntryin classHttpCacheContext
-
getHttpRoute
public RouteInfo getHttpRoute()
Description copied from class:HttpClientContextRepresents current route used to execute message exchanges.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getHttpRoutein classHttpClientContext
-
setRoute
@Internal public void setRoute(HttpRoute route)
- Overrides:
setRoutein classHttpClientContext
-
getRedirectLocations
public RedirectLocations getRedirectLocations()
Description copied from class:HttpClientContextRepresents a collection of all redirects executed in the context of request execution.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getRedirectLocationsin classHttpClientContext
-
setRedirectLocations
@Internal public void setRedirectLocations(RedirectLocations redirectLocations)
- Overrides:
setRedirectLocationsin classHttpClientContext
-
getCookieStore
public CookieStore getCookieStore()
Description copied from class:HttpClientContextRepresents aCookieStoreused in the context of the request execution.This context attribute can be set by the caller.
- Overrides:
getCookieStorein classHttpClientContext
-
setCookieStore
public void setCookieStore(CookieStore cookieStore)
- Overrides:
setCookieStorein classHttpClientContext
-
getCookieSpec
public CookieSpec getCookieSpec()
Description copied from class:HttpClientContextRepresents aCookieSpecchosen in the context of request execution.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getCookieSpecin classHttpClientContext
-
setCookieSpec
@Internal public void setCookieSpec(CookieSpec cookieSpec)
- Overrides:
setCookieSpecin classHttpClientContext
-
getCookieOrigin
public CookieOrigin getCookieOrigin()
Description copied from class:HttpClientContextRepresents aCookieOriginproduced in the context of request execution.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getCookieOriginin classHttpClientContext
-
setCookieOrigin
@Internal public void setCookieOrigin(CookieOrigin cookieOrigin)
- Overrides:
setCookieOriginin classHttpClientContext
-
getCookieSpecRegistry
public org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> getCookieSpecRegistry()
Description copied from class:HttpClientContextRepresents aCookieSpecFactoryregistry used in the context of the request execution.This context attribute can be set by the caller.
- Overrides:
getCookieSpecRegistryin classHttpClientContext
-
setCookieSpecRegistry
public void setCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> lookup)
- Overrides:
setCookieSpecRegistryin classHttpClientContext
-
getAuthSchemeRegistry
public org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> getAuthSchemeRegistry()
Description copied from class:HttpClientContextRepresents aAuthSchemeFactoryregistry used in the context of the request execution.This context attribute can be set by the caller.
- Overrides:
getAuthSchemeRegistryin classHttpClientContext
-
setAuthSchemeRegistry
public void setAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> lookup)
- Overrides:
setAuthSchemeRegistryin classHttpClientContext
-
getCredentialsProvider
public CredentialsProvider getCredentialsProvider()
Description copied from class:HttpClientContextRepresents aCredentialsProviderregistry used in the context of the request execution.This context attribute can be set by the caller.
- Overrides:
getCredentialsProviderin classHttpClientContext
-
setCredentialsProvider
public void setCredentialsProvider(CredentialsProvider credentialsProvider)
- Overrides:
setCredentialsProviderin classHttpClientContext
-
getAuthCache
public AuthCache getAuthCache()
Description copied from class:HttpClientContextRepresents aAuthCacheused in the context of the request execution.This context attribute can be set by the caller.
- Overrides:
getAuthCachein classHttpClientContext
-
setAuthCache
public void setAuthCache(AuthCache authCache)
- Overrides:
setAuthCachein classHttpClientContext
-
getAuthExchanges
public java.util.Map<org.apache.hc.core5.http.HttpHost,AuthExchange> getAuthExchanges()
Description copied from class:HttpClientContextRepresents a map ofAuthExchanges performed in the context of the request execution.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getAuthExchangesin classHttpClientContext
-
getAuthExchange
public AuthExchange getAuthExchange(org.apache.hc.core5.http.HttpHost host)
- Overrides:
getAuthExchangein classHttpClientContext
-
setAuthExchange
public void setAuthExchange(org.apache.hc.core5.http.HttpHost host, AuthExchange authExchange)- Overrides:
setAuthExchangein classHttpClientContext
-
resetAuthExchange
public void resetAuthExchange(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme)- Overrides:
resetAuthExchangein classHttpClientContext
-
getUserToken
public java.lang.Object getUserToken()
Description copied from class:HttpClientContextRepresents an arbitrary user token that identifies the user in the context of the request execution.This context attribute can be set by the caller.
- Overrides:
getUserTokenin classHttpClientContext
-
setUserToken
public void setUserToken(java.lang.Object userToken)
- Overrides:
setUserTokenin classHttpClientContext
-
getRequestConfig
public RequestConfig getRequestConfig()
Description copied from class:HttpClientContextRepresents anusedin the context of the request execution.This context attribute can be set by the caller.
- Overrides:
getRequestConfigin classHttpClientContext
-
setRequestConfig
public void setRequestConfig(RequestConfig requestConfig)
- Overrides:
setRequestConfigin classHttpClientContext
-
getExchangeId
public java.lang.String getExchangeId()
Description copied from class:HttpClientContextRepresents an identifier generated for the current message exchange executed in the given context.This context attribute is expected to be populated by the protocol handler.
- Overrides:
getExchangeIdin classHttpClientContext
-
setExchangeId
public void setExchangeId(java.lang.String exchangeId)
- Overrides:
setExchangeIdin classHttpClientContext
-
getRequest
public org.apache.hc.core5.http.HttpRequest getRequest()
- Overrides:
getRequestin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
setRequest
public void setRequest(org.apache.hc.core5.http.HttpRequest request)
- Overrides:
setRequestin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
getResponse
public org.apache.hc.core5.http.HttpResponse getResponse()
- Overrides:
getResponsein classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
setResponse
public void setResponse(org.apache.hc.core5.http.HttpResponse response)
- Overrides:
setResponsein classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
getEndpointDetails
public org.apache.hc.core5.http.EndpointDetails getEndpointDetails()
- Overrides:
getEndpointDetailsin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
setEndpointDetails
public void setEndpointDetails(org.apache.hc.core5.http.EndpointDetails endpointDetails)
- Overrides:
setEndpointDetailsin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
getSSLSession
public javax.net.ssl.SSLSession getSSLSession()
- Overrides:
getSSLSessionin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
setSSLSession
public void setSSLSession(javax.net.ssl.SSLSession sslSession)
- Overrides:
setSSLSessionin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
getProtocolVersion
public org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()
- Specified by:
getProtocolVersionin interfaceorg.apache.hc.core5.http.protocol.HttpContext- Overrides:
getProtocolVersionin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
setProtocolVersion
public void setProtocolVersion(org.apache.hc.core5.http.ProtocolVersion version)
- Specified by:
setProtocolVersionin interfaceorg.apache.hc.core5.http.protocol.HttpContext- Overrides:
setProtocolVersionin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
getAttribute
public java.lang.Object getAttribute(java.lang.String id)
- Specified by:
getAttributein interfaceorg.apache.hc.core5.http.protocol.HttpContext- Overrides:
getAttributein classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
setAttribute
public java.lang.Object setAttribute(java.lang.String id, java.lang.Object obj)- Specified by:
setAttributein interfaceorg.apache.hc.core5.http.protocol.HttpContext- Overrides:
setAttributein classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
removeAttribute
public java.lang.Object removeAttribute(java.lang.String id)
- Specified by:
removeAttributein interfaceorg.apache.hc.core5.http.protocol.HttpContext- Overrides:
removeAttributein classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
getAttribute
public <T> T getAttribute(java.lang.String id, java.lang.Class<T> clazz)- Overrides:
getAttributein classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.apache.hc.core5.http.protocol.HttpCoreContext
-
-