Class SharingHttpContext

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.http.protocol.HttpContext

    final class SharingHttpContext
    extends org.apache.http.client.protocol.HttpClientContext
    implements java.io.Closeable
    HTTP context that shares certain attributes among requests to optimize the communication with the server.
    See Also:
    Stateful HTTP connections
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private SharingAuthCache authCache  
      private LocalState state  
      • Fields inherited from class org.apache.http.client.protocol.HttpClientContext

        AUTH_CACHE, AUTHSCHEME_REGISTRY, COOKIE_ORIGIN, COOKIE_SPEC, COOKIE_STORE, COOKIESPEC_REGISTRY, CREDS_PROVIDER, HTTP_ROUTE, PROXY_AUTH_STATE, REDIRECT_LOCATIONS, REQUEST_CONFIG, TARGET_AUTH_STATE, USER_TOKEN
      • Fields inherited from class org.apache.http.protocol.HttpCoreContext

        HTTP_CONNECTION, HTTP_REQ_SENT, HTTP_REQUEST, HTTP_RESPONSE, HTTP_TARGET_HOST
      • Fields inherited from interface org.apache.http.protocol.HttpContext

        RESERVED_PREFIX
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.Object getAttribute​(java.lang.String id)  
      java.lang.Object removeAttribute​(java.lang.String id)  
      void setAttribute​(java.lang.String id, java.lang.Object obj)  
      • Methods inherited from class org.apache.http.client.protocol.HttpClientContext

        adapt, create, getAuthCache, getAuthSchemeRegistry, getCookieOrigin, getCookieSpec, getCookieSpecRegistry, getCookieStore, getCredentialsProvider, getHttpRoute, getProxyAuthState, getRedirectLocations, getRequestConfig, getTargetAuthState, getUserToken, getUserToken, setAuthCache, setAuthSchemeRegistry, setCookieSpecRegistry, setCookieStore, setCredentialsProvider, setRequestConfig, setUserToken
      • Methods inherited from class org.apache.http.protocol.HttpCoreContext

        getAttribute, getConnection, getConnection, getRequest, getResponse, getTargetHost, isRequestSent, setTargetHost
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SharingHttpContext

        SharingHttpContext​(LocalState state)
    • Method Detail

      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String id)
        Specified by:
        getAttribute in interface org.apache.http.protocol.HttpContext
        Overrides:
        getAttribute in class org.apache.http.protocol.HttpCoreContext
      • setAttribute

        public void setAttribute​(java.lang.String id,
                                 java.lang.Object obj)
        Specified by:
        setAttribute in interface org.apache.http.protocol.HttpContext
        Overrides:
        setAttribute in class org.apache.http.protocol.HttpCoreContext
      • removeAttribute

        public java.lang.Object removeAttribute​(java.lang.String id)
        Specified by:
        removeAttribute in interface org.apache.http.protocol.HttpContext
        Overrides:
        removeAttribute in class org.apache.http.protocol.HttpCoreContext
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable