Class HttpClientContext.Delegate
- java.lang.Object
-
- org.apache.hc.core5.http.protocol.HttpCoreContext
-
- org.apache.hc.client5.http.protocol.HttpClientContext
-
- org.apache.hc.client5.http.protocol.HttpClientContext.Delegate
-
- All Implemented Interfaces:
org.apache.hc.core5.http.protocol.HttpContext
- Enclosing class:
- HttpClientContext
@Internal static class HttpClientContext.Delegate extends HttpClientContext
Internal adaptor class that delegates all its method calls to a plainHttpContext. To be removed in the future.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.hc.client5.http.protocol.HttpClientContext
HttpClientContext.Delegate
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.hc.core5.http.protocol.HttpContexthttpContext-
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(org.apache.hc.core5.http.protocol.HttpContext httpContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) <T> TgetAttr(java.lang.String id, java.lang.Class<T> clazz)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.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.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()RequestConfiggetRequestConfig()Represents anusedin the context of the request execution.org.apache.hc.core5.http.HttpResponsegetResponse()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)java.lang.ObjectsetAttribute(java.lang.String id, java.lang.Object obj)voidsetAuthCache(AuthCache authCache)voidsetAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> lookup)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)voidsetRequestConfig(RequestConfig requestConfig)voidsetResponse(org.apache.hc.core5.http.HttpResponse response)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.protocol.HttpClientContext
adapt, cast, castOrCreate, create, getAuthExchange, getNextNonce, getRequestConfigOrDefault, getUserToken, resetAuthExchange, setAuthExchange, setNextNonce
-
-
-
-
Method Detail
-
getAttr
<T> T getAttr(java.lang.String id, java.lang.Class<T> clazz)
-
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
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
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
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
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
-
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
-
-