Class 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 common HttpContext attributes used in the course of HTTP request execution.
    Since:
    4.3
    • Field Detail

      • HTTP_ROUTE

        public static final java.lang.String HTTP_ROUTE
        Attribute name of a RouteInfo object that represents the actual connection route.
        See Also:
        Constant Field Values
      • REDIRECT_LOCATIONS

        public static final java.lang.String REDIRECT_LOCATIONS
        Attribute name of a List object that represents a collection of all redirect locations received in the process of request execution.
        See Also:
        Constant Field Values
      • COOKIE_SPEC

        public static final java.lang.String COOKIE_SPEC
        Attribute name of a CookieSpec object that represents the actual cookie specification.
        See Also:
        Constant Field Values
      • COOKIE_ORIGIN

        public static final java.lang.String COOKIE_ORIGIN
        Attribute name of a CookieOrigin object 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 a CookieStore object that represents the actual cookie store.
        See Also:
        Constant Field Values
      • AUTH_CACHE

        public static final java.lang.String AUTH_CACHE
        Attribute name of a AuthCache object 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 a AuthState object 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 a AuthState object 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 a Object object that represents the actual user identity such as user Principal.
        See Also:
        Constant Field Values
      • REQUEST_CONFIG

        public static final java.lang.String REQUEST_CONFIG
        Attribute name of a RequestConfig object that represents the actual request configuration.
        See Also:
        Constant Field Values
    • Constructor Detail

      • HttpClientContext

        public HttpClientContext​(HttpContext context)
      • HttpClientContext

        public HttpClientContext()
    • Method Detail

      • getHttpRoute

        public RouteInfo getHttpRoute()
      • getRedirectLocations

        public java.util.List<java.net.URI> getRedirectLocations()
      • setCookieStore

        public void setCookieStore​(CookieStore cookieStore)
      • getCookieSpec

        public CookieSpec getCookieSpec()
      • 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)
      • setRequestConfig

        public void setRequestConfig​(RequestConfig config)