Class HttpCoreContext.Delegate
java.lang.Object
org.apache.hc.core5.http.protocol.HttpCoreContext
org.apache.hc.core5.http.protocol.HttpCoreContext.Delegate
- All Implemented Interfaces:
HttpContext
- Enclosing class:
HttpCoreContext
Internal adaptor class that delegates all its method calls to a plain
HttpContext.
To be removed in the future.- Since:
- 4.3
-
Nested Class Summary
Nested classes/interfaces inherited from class HttpCoreContext
HttpCoreContext.Delegate -
Field Summary
FieldsFields inherited from class HttpCoreContext
CONNECTION_ENDPOINT, HTTP_REQUEST, HTTP_RESPONSE, SSL_SESSIONFields inherited from interface HttpContext
RESERVED_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) <T> TgetAttribute(String id) Obtains attribute with the given name.<T> TgetAttribute(String id, Class<T> clazz) Represents current connection endpoint details.Represents the protocol version used by the message exchange.Represents current request message head.Represents current response message head.Represents current TLS session details.Removes attribute with the given name from the context.setAttribute(String id, Object obj) Sets value of the attribute with the given name.voidsetEndpointDetails(EndpointDetails endpointDetails) voidsetProtocolVersion(ProtocolVersion version) Sets protocol version used in this context.voidsetRequest(HttpRequest request) voidsetResponse(HttpResponse response) voidsetSSLSession(SSLSession sslSession) toString()Methods inherited from class HttpCoreContext
adapt, cast, castOrCreate, create
-
Field Details
-
httpContext
-
-
Constructor Details
-
Delegate
Delegate(HttpContext httpContext)
-
-
Method Details
-
getAttr
-
getRequest
Description copied from class:HttpCoreContextRepresents current request message head.This context attribute is expected to be populated by the protocol handler in the course of request execution.
- Overrides:
getRequestin classHttpCoreContext
-
setRequest
- Overrides:
setRequestin classHttpCoreContext
-
getResponse
Description copied from class:HttpCoreContextRepresents current response message head.This context attribute is expected to be populated by the protocol handler in the course of request execution.
- Overrides:
getResponsein classHttpCoreContext
-
setResponse
- Overrides:
setResponsein classHttpCoreContext
-
getEndpointDetails
Description copied from class:HttpCoreContextRepresents current connection endpoint details.This context attribute is expected to be populated by the protocol handler in the course of request execution.
- Overrides:
getEndpointDetailsin classHttpCoreContext
-
setEndpointDetails
- Overrides:
setEndpointDetailsin classHttpCoreContext
-
getSSLSession
Description copied from class:HttpCoreContextRepresents current TLS session details.This context attribute is expected to be populated by the protocol handler in the course of request execution.
- Overrides:
getSSLSessionin classHttpCoreContext
-
setSSLSession
- Overrides:
setSSLSessionin classHttpCoreContext
-
getProtocolVersion
Description copied from class:HttpCoreContextRepresents the protocol version used by the message exchange.This context attribute is expected to be populated by the protocol handler in the course of request execution.
- Specified by:
getProtocolVersionin interfaceHttpContext- Overrides:
getProtocolVersionin classHttpCoreContext
-
setProtocolVersion
Description copied from interface:HttpContextSets protocol version used in this context.- Specified by:
setProtocolVersionin interfaceHttpContext- Overrides:
setProtocolVersionin classHttpCoreContext
-
getAttribute
Description copied from interface:HttpContextObtains attribute with the given name.- Specified by:
getAttributein interfaceHttpContext- Overrides:
getAttributein classHttpCoreContext- Parameters:
id- the attribute name.- Returns:
- attribute value, or
nullif not set.
-
setAttribute
Description copied from interface:HttpContextSets value of the attribute with the given name.- Specified by:
setAttributein interfaceHttpContext- Overrides:
setAttributein classHttpCoreContext- Parameters:
id- the attribute name.obj- the attribute value.- Returns:
- the previous value associated with
id, ornullif there was no mapping forid.
-
removeAttribute
Description copied from interface:HttpContextRemoves attribute with the given name from the context.- Specified by:
removeAttributein interfaceHttpContext- Overrides:
removeAttributein classHttpCoreContext- Parameters:
id- the attribute name.- Returns:
- attribute value, or
nullif not set.
-
getAttribute
- Overrides:
getAttributein classHttpCoreContext
-
toString
- Overrides:
toStringin classHttpCoreContext
-