Class 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 plain HttpContext. To be removed in the future.
    • Field Detail

      • httpContext

        private final org.apache.hc.core5.http.protocol.HttpContext httpContext
    • Constructor Detail

      • Delegate

        Delegate​(org.apache.hc.core5.http.protocol.HttpContext httpContext)
    • Method Detail

      • getAttr

        <T> T getAttr​(java.lang.String id,
                      java.lang.Class<T> clazz)
      • getHttpRoute

        public RouteInfo getHttpRoute()
        Description copied from class: HttpClientContext
        Represents current route used to execute message exchanges.

        This context attribute is expected to be populated by the protocol handler.

        Overrides:
        getHttpRoute in class HttpClientContext
      • getAuthExchanges

        public java.util.Map<org.apache.hc.core5.http.HttpHost,​AuthExchange> getAuthExchanges()
        Description copied from class: HttpClientContext
        Represents a map of AuthExchanges performed in the context of the request execution.

        This context attribute is expected to be populated by the protocol handler.

        Overrides:
        getAuthExchanges in class HttpClientContext
      • getUserToken

        public java.lang.Object getUserToken()
        Description copied from class: HttpClientContext
        Represents 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:
        getUserToken in class HttpClientContext
      • getExchangeId

        public java.lang.String getExchangeId()
        Description copied from class: HttpClientContext
        Represents 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:
        getExchangeId in class HttpClientContext
      • getRequest

        public org.apache.hc.core5.http.HttpRequest getRequest()
        Overrides:
        getRequest in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • setRequest

        public void setRequest​(org.apache.hc.core5.http.HttpRequest request)
        Overrides:
        setRequest in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • getResponse

        public org.apache.hc.core5.http.HttpResponse getResponse()
        Overrides:
        getResponse in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • setResponse

        public void setResponse​(org.apache.hc.core5.http.HttpResponse response)
        Overrides:
        setResponse in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • getEndpointDetails

        public org.apache.hc.core5.http.EndpointDetails getEndpointDetails()
        Overrides:
        getEndpointDetails in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • setEndpointDetails

        public void setEndpointDetails​(org.apache.hc.core5.http.EndpointDetails endpointDetails)
        Overrides:
        setEndpointDetails in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • getSSLSession

        public javax.net.ssl.SSLSession getSSLSession()
        Overrides:
        getSSLSession in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • setSSLSession

        public void setSSLSession​(javax.net.ssl.SSLSession sslSession)
        Overrides:
        setSSLSession in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • getProtocolVersion

        public org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()
        Specified by:
        getProtocolVersion in interface org.apache.hc.core5.http.protocol.HttpContext
        Overrides:
        getProtocolVersion in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • setProtocolVersion

        public void setProtocolVersion​(org.apache.hc.core5.http.ProtocolVersion version)
        Specified by:
        setProtocolVersion in interface org.apache.hc.core5.http.protocol.HttpContext
        Overrides:
        setProtocolVersion in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • getAttribute

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

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

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

        public <T> T getAttribute​(java.lang.String id,
                                  java.lang.Class<T> clazz)
        Overrides:
        getAttribute in class org.apache.hc.core5.http.protocol.HttpCoreContext
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.apache.hc.core5.http.protocol.HttpCoreContext