@Contract(threading=SAFE) public class CachingHttpAsyncClient extends java.lang.Object implements HttpAsyncClient
Modifier and Type | Field and Description |
---|---|
private AsynchronousAsyncValidator |
asynchAsyncRevalidator |
private HttpAsyncClient |
backend |
private org.apache.http.impl.client.cache.CacheableRequestPolicy |
cacheableRequestPolicy |
private java.util.concurrent.atomic.AtomicLong |
cacheHits |
private java.util.concurrent.atomic.AtomicLong |
cacheMisses |
private java.util.concurrent.atomic.AtomicLong |
cacheUpdates |
private org.apache.http.impl.client.cache.ConditionalRequestBuilder |
conditionalRequestBuilder |
private org.apache.commons.logging.Log |
log |
private long |
maxObjectSizeBytes |
private org.apache.http.impl.client.cache.RequestProtocolCompliance |
requestCompliance |
private org.apache.http.impl.client.cache.HttpCache |
responseCache |
private org.apache.http.impl.client.cache.ResponseCachingPolicy |
responseCachingPolicy |
private org.apache.http.impl.client.cache.ResponseProtocolCompliance |
responseCompliance |
private org.apache.http.impl.client.cache.CachedHttpResponseGenerator |
responseGenerator |
private boolean |
sharedCache |
private org.apache.http.impl.client.cache.CachedResponseSuitabilityChecker |
suitabilityChecker |
private static boolean |
SUPPORTS_RANGE_AND_CONTENT_RANGE_HEADERS |
private org.apache.http.impl.client.cache.CacheValidityPolicy |
validityPolicy |
private java.util.Map<org.apache.http.ProtocolVersion,java.lang.String> |
viaHeaders |
Constructor and Description |
---|
CachingHttpAsyncClient() |
CachingHttpAsyncClient(org.apache.http.impl.client.cache.CacheConfig config) |
CachingHttpAsyncClient(HttpAsyncClient client) |
CachingHttpAsyncClient(HttpAsyncClient client,
org.apache.http.impl.client.cache.CacheConfig config) |
CachingHttpAsyncClient(HttpAsyncClient backend,
org.apache.http.impl.client.cache.CacheValidityPolicy validityPolicy,
org.apache.http.impl.client.cache.ResponseCachingPolicy responseCachingPolicy,
org.apache.http.impl.client.cache.HttpCache responseCache,
org.apache.http.impl.client.cache.CachedHttpResponseGenerator responseGenerator,
org.apache.http.impl.client.cache.CacheableRequestPolicy cacheableRequestPolicy,
org.apache.http.impl.client.cache.CachedResponseSuitabilityChecker suitabilityChecker,
org.apache.http.impl.client.cache.ConditionalRequestBuilder conditionalRequestBuilder,
org.apache.http.impl.client.cache.ResponseProtocolCompliance responseCompliance,
org.apache.http.impl.client.cache.RequestProtocolCompliance requestCompliance) |
CachingHttpAsyncClient(HttpAsyncClient client,
org.apache.http.impl.client.cache.HttpCache cache,
org.apache.http.impl.client.cache.CacheConfig config) |
CachingHttpAsyncClient(HttpAsyncClient client,
org.apache.http.client.cache.HttpCacheStorage storage,
org.apache.http.impl.client.cache.CacheConfig config) |
CachingHttpAsyncClient(HttpAsyncClient client,
org.apache.http.client.cache.ResourceFactory resourceFactory,
org.apache.http.client.cache.HttpCacheStorage storage,
org.apache.http.impl.client.cache.CacheConfig config) |
Modifier and Type | Method and Description |
---|---|
private boolean |
alreadyHaveNewerCacheEntry(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.HttpResponse backendResponse) |
(package private) void |
callBackend(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext) |
(package private) boolean |
clientRequestsOurOptions(org.apache.http.HttpRequest request) |
<T> java.util.concurrent.Future<T> |
execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
org.apache.http.concurrent.FutureCallback<T> callback)
Initiates asynchronous HTTP request execution using the default
context.
|
<T> java.util.concurrent.Future<T> |
execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
org.apache.http.protocol.HttpContext context,
org.apache.http.concurrent.FutureCallback<T> callback)
Initiates asynchronous HTTP request execution using the given context.
|
java.util.concurrent.Future<org.apache.http.HttpResponse> |
execute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
Initiates asynchronous HTTP request execution against the given target.
|
java.util.concurrent.Future<org.apache.http.HttpResponse> |
execute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest originalRequest,
org.apache.http.protocol.HttpContext context,
org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> futureCallback)
Initiates asynchronous HTTP request execution against the given target
using the given context.
|
java.util.concurrent.Future<org.apache.http.HttpResponse> |
execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
Initiates asynchronous HTTP request execution.
|
java.util.concurrent.Future<org.apache.http.HttpResponse> |
execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.protocol.HttpContext context,
org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
Initiates asynchronous HTTP request execution using the given
context.
|
private boolean |
explicitFreshnessRequest(org.apache.http.HttpRequest request,
org.apache.http.client.cache.HttpCacheEntry entry,
java.util.Date now) |
private void |
flushEntriesInvalidatedByRequest(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request) |
private org.apache.http.HttpResponse |
generateCachedResponse(org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.HttpCacheEntry entry,
java.util.Date now) |
private org.apache.http.HttpResponse |
generateGatewayTimeout(org.apache.http.client.cache.HttpCacheContext clientContext) |
private java.lang.String |
generateViaHeader(org.apache.http.HttpMessage msg) |
long |
getCacheHits()
Reports the number of times that the cache successfully responded
to an
HttpRequest without contacting the origin server. |
long |
getCacheMisses()
Reports the number of times that the cache contacted the origin
server because it had no appropriate response cached.
|
long |
getCacheUpdates()
Reports the number of times that the cache was able to satisfy
a response by revalidating an existing but stale cache entry.
|
(package private) java.util.Date |
getCurrentDate() |
private java.util.Map<java.lang.String,org.apache.http.impl.client.cache.Variant> |
getExistingCacheVariants(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request) |
private org.apache.http.HttpResponse |
getFatallyNoncompliantResponse(org.apache.http.HttpRequest request,
org.apache.http.client.cache.HttpCacheContext clientContext) |
private org.apache.http.client.cache.HttpCacheEntry |
getUpdatedVariantEntry(org.apache.http.HttpHost target,
org.apache.http.HttpRequest conditionalRequest,
java.util.Date requestDate,
java.util.Date responseDate,
org.apache.http.HttpResponse backendResponse,
org.apache.http.impl.client.cache.Variant matchingVariant,
org.apache.http.client.cache.HttpCacheEntry matchedEntry) |
(package private) org.apache.http.client.methods.CloseableHttpResponse |
handleBackendResponse(org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
java.util.Date requestDate,
java.util.Date responseDate,
org.apache.http.client.methods.CloseableHttpResponse backendResponse) |
private void |
handleCacheHit(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.HttpCacheEntry entry) |
private void |
handleCacheMiss(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext) |
private org.apache.http.HttpResponse |
handleRevalidationFailure(org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.HttpCacheEntry entry,
java.util.Date now) |
boolean |
isSharedCache()
Reports whether this
CachingHttpClient is configured as
a shared (public) or non-shared (private) cache. |
private AsynchronousAsyncValidator |
makeAsynchronousValidator(org.apache.http.impl.client.cache.CacheConfig config) |
private boolean |
mayCallBackend(org.apache.http.HttpRequest request) |
(package private) void |
negotiateResponseFromVariants(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
java.util.Map<java.lang.String,org.apache.http.impl.client.cache.Variant> variants) |
private void |
recordCacheHit(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request) |
private void |
recordCacheMiss(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request) |
private void |
recordCacheUpdate(org.apache.http.client.cache.HttpCacheContext clientContext) |
private void |
retryRequestUnconditionally(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.HttpCacheEntry matchedEntry) |
(package private) void |
revalidateCacheEntry(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.HttpCacheEntry cacheEntry) |
private void |
revalidateCacheEntry(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.HttpCacheEntry entry,
java.util.Date now) |
private void |
revalidateCacheEntryCompleted(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future,
org.apache.http.HttpHost target,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.HttpCacheEntry cacheEntry,
org.apache.http.client.methods.HttpRequestWrapper conditionalRequest,
java.util.Date requestDate,
org.apache.http.HttpResponse httpResponse,
java.util.Date responseDate) |
private boolean |
revalidationResponseIsTooOld(org.apache.http.HttpResponse backendResponse,
org.apache.http.client.cache.HttpCacheEntry cacheEntry) |
private org.apache.http.client.cache.HttpCacheEntry |
satisfyFromCache(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request) |
private void |
setResponseStatus(org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.cache.CacheResponseStatus value) |
private boolean |
shouldSendNotModifiedResponse(org.apache.http.HttpRequest request,
org.apache.http.client.cache.HttpCacheEntry responseEntry) |
private boolean |
staleIfErrorAppliesTo(int statusCode) |
private boolean |
staleResponseNotAllowed(org.apache.http.HttpRequest request,
org.apache.http.client.cache.HttpCacheEntry entry,
java.util.Date now) |
private void |
storeRequestIfModifiedSinceFor304Response(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse backendResponse)
For 304 Not modified responses, adds a "Last-Modified" header with the
value of the "If-Modified-Since" header passed in the request.
|
boolean |
supportsRangeAndContentRangeHeaders()
Reports whether this
CachingHttpClient implementation
supports byte-range requests as specified by the Range
and Content-Range headers. |
private void |
tryToUpdateVariantMap(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.impl.client.cache.Variant matchingVariant) |
private org.apache.http.HttpResponse |
unvalidatedCacheHit(org.apache.http.client.cache.HttpCacheContext clientContext,
org.apache.http.client.methods.HttpRequestWrapper request,
org.apache.http.client.cache.HttpCacheEntry entry) |
private static final boolean SUPPORTS_RANGE_AND_CONTENT_RANGE_HEADERS
private final java.util.concurrent.atomic.AtomicLong cacheHits
private final java.util.concurrent.atomic.AtomicLong cacheMisses
private final java.util.concurrent.atomic.AtomicLong cacheUpdates
private final java.util.Map<org.apache.http.ProtocolVersion,java.lang.String> viaHeaders
private final HttpAsyncClient backend
private final org.apache.http.impl.client.cache.HttpCache responseCache
private final org.apache.http.impl.client.cache.CacheValidityPolicy validityPolicy
private final org.apache.http.impl.client.cache.ResponseCachingPolicy responseCachingPolicy
private final org.apache.http.impl.client.cache.CachedHttpResponseGenerator responseGenerator
private final org.apache.http.impl.client.cache.CacheableRequestPolicy cacheableRequestPolicy
private final org.apache.http.impl.client.cache.CachedResponseSuitabilityChecker suitabilityChecker
private final org.apache.http.impl.client.cache.ConditionalRequestBuilder conditionalRequestBuilder
private final long maxObjectSizeBytes
private final boolean sharedCache
private final org.apache.http.impl.client.cache.ResponseProtocolCompliance responseCompliance
private final org.apache.http.impl.client.cache.RequestProtocolCompliance requestCompliance
private final AsynchronousAsyncValidator asynchAsyncRevalidator
private final org.apache.commons.logging.Log log
CachingHttpAsyncClient(HttpAsyncClient client, org.apache.http.impl.client.cache.HttpCache cache, org.apache.http.impl.client.cache.CacheConfig config)
public CachingHttpAsyncClient() throws org.apache.http.nio.reactor.IOReactorException
org.apache.http.nio.reactor.IOReactorException
public CachingHttpAsyncClient(org.apache.http.impl.client.cache.CacheConfig config) throws org.apache.http.nio.reactor.IOReactorException
org.apache.http.nio.reactor.IOReactorException
public CachingHttpAsyncClient(HttpAsyncClient client)
public CachingHttpAsyncClient(HttpAsyncClient client, org.apache.http.impl.client.cache.CacheConfig config)
public CachingHttpAsyncClient(HttpAsyncClient client, org.apache.http.client.cache.ResourceFactory resourceFactory, org.apache.http.client.cache.HttpCacheStorage storage, org.apache.http.impl.client.cache.CacheConfig config)
public CachingHttpAsyncClient(HttpAsyncClient client, org.apache.http.client.cache.HttpCacheStorage storage, org.apache.http.impl.client.cache.CacheConfig config)
CachingHttpAsyncClient(HttpAsyncClient backend, org.apache.http.impl.client.cache.CacheValidityPolicy validityPolicy, org.apache.http.impl.client.cache.ResponseCachingPolicy responseCachingPolicy, org.apache.http.impl.client.cache.HttpCache responseCache, org.apache.http.impl.client.cache.CachedHttpResponseGenerator responseGenerator, org.apache.http.impl.client.cache.CacheableRequestPolicy cacheableRequestPolicy, org.apache.http.impl.client.cache.CachedResponseSuitabilityChecker suitabilityChecker, org.apache.http.impl.client.cache.ConditionalRequestBuilder conditionalRequestBuilder, org.apache.http.impl.client.cache.ResponseProtocolCompliance responseCompliance, org.apache.http.impl.client.cache.RequestProtocolCompliance requestCompliance)
private AsynchronousAsyncValidator makeAsynchronousValidator(org.apache.http.impl.client.cache.CacheConfig config)
public long getCacheHits()
HttpRequest
without contacting the origin server.public long getCacheMisses()
public long getCacheUpdates()
public java.util.concurrent.Future<org.apache.http.HttpResponse> execute(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
HttpAsyncClient
execute
in interface HttpAsyncClient
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executecallback
- future callback.public <T> java.util.concurrent.Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.concurrent.FutureCallback<T> callback)
HttpAsyncClient
The request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.
execute
in interface HttpAsyncClient
T
- the result type of request execution.requestProducer
- request producer callback.responseConsumer
- response consumer callaback.callback
- future callback.public <T> java.util.concurrent.Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.protocol.HttpContext context, org.apache.http.concurrent.FutureCallback<T> callback)
HttpAsyncClient
The request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.
Please note it may be unsafe to interact with the context instance while the request is still being executed.
execute
in interface HttpAsyncClient
T
- the result type of request execution.requestProducer
- request producer callback.responseConsumer
- response consumer callaback.context
- HTTP contextcallback
- future callback.public java.util.concurrent.Future<org.apache.http.HttpResponse> execute(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
HttpAsyncClient
execute
in interface HttpAsyncClient
request
- the request to executecallback
- future callback.public java.util.concurrent.Future<org.apache.http.HttpResponse> execute(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.protocol.HttpContext context, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
HttpAsyncClient
Please note it may be unsafe to interact with the context instance while the request is still being executed.
execute
in interface HttpAsyncClient
request
- the request to executecontext
- HTTP contextcallback
- future callback.public java.util.concurrent.Future<org.apache.http.HttpResponse> execute(org.apache.http.HttpHost target, org.apache.http.HttpRequest originalRequest, org.apache.http.protocol.HttpContext context, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> futureCallback)
HttpAsyncClient
Please note it may be unsafe to interact with the context instance while the request is still being executed.
execute
in interface HttpAsyncClient
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.originalRequest
- the request to executecontext
- the context to use for the execution, or
null
to use the default contextfutureCallback
- future callback.private void handleCacheHit(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.HttpCacheEntry entry) throws java.io.IOException
java.io.IOException
private void revalidateCacheEntry(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.HttpCacheEntry entry, java.util.Date now) throws org.apache.http.client.ClientProtocolException
org.apache.http.client.ClientProtocolException
private void handleCacheMiss(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext)
private org.apache.http.client.cache.HttpCacheEntry satisfyFromCache(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)
private org.apache.http.HttpResponse getFatallyNoncompliantResponse(org.apache.http.HttpRequest request, org.apache.http.client.cache.HttpCacheContext clientContext)
private java.util.Map<java.lang.String,org.apache.http.impl.client.cache.Variant> getExistingCacheVariants(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)
private void recordCacheMiss(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)
private void recordCacheHit(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)
private void recordCacheUpdate(org.apache.http.client.cache.HttpCacheContext clientContext)
private void flushEntriesInvalidatedByRequest(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)
private org.apache.http.HttpResponse generateCachedResponse(org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.HttpCacheEntry entry, java.util.Date now)
private org.apache.http.HttpResponse handleRevalidationFailure(org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.HttpCacheEntry entry, java.util.Date now)
private org.apache.http.HttpResponse generateGatewayTimeout(org.apache.http.client.cache.HttpCacheContext clientContext)
private org.apache.http.HttpResponse unvalidatedCacheHit(org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheEntry entry)
private boolean staleResponseNotAllowed(org.apache.http.HttpRequest request, org.apache.http.client.cache.HttpCacheEntry entry, java.util.Date now)
private boolean mayCallBackend(org.apache.http.HttpRequest request)
private boolean explicitFreshnessRequest(org.apache.http.HttpRequest request, org.apache.http.client.cache.HttpCacheEntry entry, java.util.Date now)
private java.lang.String generateViaHeader(org.apache.http.HttpMessage msg)
private void setResponseStatus(org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.CacheResponseStatus value)
public boolean supportsRangeAndContentRangeHeaders()
CachingHttpClient
implementation
supports byte-range requests as specified by the Range
and Content-Range
headers.true
if byte-range requests are supportedpublic boolean isSharedCache()
CachingHttpClient
is configured as
a shared (public) or non-shared (private) cache. See CacheConfig.setSharedCache(boolean)
.true
if we are behaving as a shared (public)
cachejava.util.Date getCurrentDate()
boolean clientRequestsOurOptions(org.apache.http.HttpRequest request)
void callBackend(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext)
private boolean revalidationResponseIsTooOld(org.apache.http.HttpResponse backendResponse, org.apache.http.client.cache.HttpCacheEntry cacheEntry)
void negotiateResponseFromVariants(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, java.util.Map<java.lang.String,org.apache.http.impl.client.cache.Variant> variants)
private void retryRequestUnconditionally(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.HttpCacheEntry matchedEntry)
private org.apache.http.client.cache.HttpCacheEntry getUpdatedVariantEntry(org.apache.http.HttpHost target, org.apache.http.HttpRequest conditionalRequest, java.util.Date requestDate, java.util.Date responseDate, org.apache.http.HttpResponse backendResponse, org.apache.http.impl.client.cache.Variant matchingVariant, org.apache.http.client.cache.HttpCacheEntry matchedEntry)
private void tryToUpdateVariantMap(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.impl.client.cache.Variant matchingVariant)
private boolean shouldSendNotModifiedResponse(org.apache.http.HttpRequest request, org.apache.http.client.cache.HttpCacheEntry responseEntry)
void revalidateCacheEntry(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.HttpCacheEntry cacheEntry) throws org.apache.http.ProtocolException
org.apache.http.ProtocolException
private void revalidateCacheEntryCompleted(org.apache.http.concurrent.BasicFuture<org.apache.http.HttpResponse> future, org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.client.cache.HttpCacheContext clientContext, org.apache.http.client.cache.HttpCacheEntry cacheEntry, org.apache.http.client.methods.HttpRequestWrapper conditionalRequest, java.util.Date requestDate, org.apache.http.HttpResponse httpResponse, java.util.Date responseDate)
private boolean staleIfErrorAppliesTo(int statusCode)
org.apache.http.client.methods.CloseableHttpResponse handleBackendResponse(org.apache.http.HttpHost target, org.apache.http.client.methods.HttpRequestWrapper request, java.util.Date requestDate, java.util.Date responseDate, org.apache.http.client.methods.CloseableHttpResponse backendResponse) throws java.io.IOException
java.io.IOException
private void storeRequestIfModifiedSinceFor304Response(org.apache.http.HttpRequest request, org.apache.http.HttpResponse backendResponse)
private boolean alreadyHaveNewerCacheEntry(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.HttpResponse backendResponse)