Package org.apache.hc.client5.http.cache
Class HttpCacheContext
- java.lang.Object
-
- org.apache.hc.core5.http.protocol.HttpCoreContext
-
- org.apache.hc.client5.http.protocol.HttpClientContext
-
- org.apache.hc.client5.http.cache.HttpCacheContext
-
- All Implemented Interfaces:
org.apache.hc.core5.http.protocol.HttpContext
public class HttpCacheContext extends HttpClientContext
Adaptor class that provides convenience type safe setters and getters for cachingHttpContext
attributes.- Since:
- 4.3
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CACHE_RESPONSE_STATUS
This is the name under which theCacheResponseStatus
of a request (for example, whether it resulted in a cache hit) will be recorded if anHttpContext
is provided during execution.-
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 HttpCacheContext()
HttpCacheContext(org.apache.hc.core5.http.protocol.HttpContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpCacheContext
adapt(org.apache.hc.core5.http.protocol.HttpContext context)
static HttpCacheContext
create()
CacheResponseStatus
getCacheResponseStatus()
-
Methods inherited from class org.apache.hc.client5.http.protocol.HttpClientContext
getAuthCache, getAuthExchange, getAuthExchanges, getAuthSchemeRegistry, getCookieOrigin, getCookieSpec, getCookieSpecRegistry, getCookieStore, getCredentialsProvider, getExchangeId, getHttpRoute, getRedirectLocations, getRequestConfig, getUserToken, getUserToken, resetAuthExchange, setAuthCache, setAuthExchange, setAuthSchemeRegistry, setCookieSpecRegistry, setCookieStore, setCredentialsProvider, setExchangeId, setRequestConfig, setUserToken
-
-
-
-
Field Detail
-
CACHE_RESPONSE_STATUS
public static final java.lang.String CACHE_RESPONSE_STATUS
This is the name under which theCacheResponseStatus
of a request (for example, whether it resulted in a cache hit) will be recorded if anHttpContext
is provided during execution.- See Also:
- Constant Field Values
-
-
Method Detail
-
adapt
public static HttpCacheContext adapt(org.apache.hc.core5.http.protocol.HttpContext context)
-
create
public static HttpCacheContext create()
-
getCacheResponseStatus
public CacheResponseStatus getCacheResponseStatus()
-
-