|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.client.cache.CachingHttpClient
@ThreadSafe public class CachingHttpClient
Field Summary | |
---|---|
static String |
CACHE_RESPONSE_STATUS
|
Constructor Summary | |
---|---|
CachingHttpClient()
|
|
CachingHttpClient(CacheConfig config)
|
|
CachingHttpClient(HttpClient client)
|
|
CachingHttpClient(HttpClient client,
CacheConfig config)
|
|
CachingHttpClient(HttpClient client,
HttpCacheStorage storage,
CacheConfig config)
|
|
CachingHttpClient(HttpClient client,
ResourceFactory resourceFactory,
HttpCacheStorage storage,
CacheConfig config)
|
Method Summary | ||
---|---|---|
HttpResponse |
execute(HttpHost target,
HttpRequest request)
Execute an HttpRequest @ a given HttpHost |
|
HttpResponse |
execute(HttpHost target,
HttpRequest request,
HttpContext context)
Executes a request to the target using the given context. |
|
|
execute(HttpHost target,
HttpRequest request,
ResponseHandler<? extends T> responseHandler)
Execute an HttpRequest @ a given HttpHost with a specified
ResponseHandler that will deal with the result of the call. |
|
|
execute(HttpHost target,
HttpRequest request,
ResponseHandler<? extends T> responseHandler,
HttpContext context)
Execute an HttpRequest @ a given HttpHost with a specified
ResponseHandler that will deal with the result of the call using
a specific HttpContext |
|
HttpResponse |
execute(HttpUriRequest request)
Executes a request using the default context. |
|
HttpResponse |
execute(HttpUriRequest request,
HttpContext context)
Executes a request using the given context. |
|
|
execute(HttpUriRequest request,
ResponseHandler<? extends T> responseHandler)
Executes a request using the default context and processes the response using the given response handler. |
|
|
execute(HttpUriRequest request,
ResponseHandler<? extends T> responseHandler,
HttpContext context)
Executes a request using the given context and processes the response using the given response handler. |
|
long |
getCacheHits()
Return the number of times that the cache successfully answered an HttpRequest for a document of information from the server. |
|
long |
getCacheMisses()
Return the number of times that the cache was unable to answer an HttpRequest for a document of information from the server. |
|
long |
getCacheUpdates()
Return the number of times that the cache was able to revalidate an existing cache entry for a document of information from the server. |
|
ClientConnectionManager |
getConnectionManager()
Obtains the connection manager used by this client. |
|
HttpParams |
getParams()
Obtains the parameters for this client. |
|
boolean |
isSharedCache()
|
|
boolean |
supportsRangeAndContentRangeHeaders()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CACHE_RESPONSE_STATUS
Constructor Detail |
---|
public CachingHttpClient()
public CachingHttpClient(CacheConfig config)
public CachingHttpClient(HttpClient client)
public CachingHttpClient(HttpClient client, CacheConfig config)
public CachingHttpClient(HttpClient client, ResourceFactory resourceFactory, HttpCacheStorage storage, CacheConfig config)
public CachingHttpClient(HttpClient client, HttpCacheStorage storage, CacheConfig config)
Method Detail |
---|
public long getCacheHits()
public long getCacheMisses()
public long getCacheUpdates()
public HttpResponse execute(HttpHost target, HttpRequest request) throws IOException
HttpRequest
@ a given HttpHost
execute
in interface HttpClient
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 execute
IOException
ClientProtocolException
- in case of an http protocol errorpublic <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler) throws IOException
HttpRequest
@ a given HttpHost
with a specified
ResponseHandler
that will deal with the result of the call.
execute
in interface HttpClient
T
- The Return Type Identified by the generic type of the ResponseHandler
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 executeresponseHandler
- the response handler
IOException
ClientProtocolException
- in case of an http protocol errorpublic <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler, HttpContext context) throws IOException
HttpRequest
@ a given HttpHost
with a specified
ResponseHandler
that will deal with the result of the call using
a specific HttpContext
execute
in interface HttpClient
T
- The Return Type Identified by the generic type of the ResponseHandler
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 executeresponseHandler
- the response handlercontext
- the context to use for the execution, or
null
to use the default context
IOException
ClientProtocolException
- in case of an http protocol errorpublic HttpResponse execute(HttpUriRequest request) throws IOException
HttpClient
execute
in interface HttpClient
request
- the request to execute
IOException
ClientProtocolException
- in case of an http protocol errorpublic HttpResponse execute(HttpUriRequest request, HttpContext context) throws IOException
HttpClient
execute
in interface HttpClient
request
- the request to executecontext
- the context to use for the execution, or
null
to use the default context
IOException
ClientProtocolException
- in case of an http protocol errorpublic <T> T execute(HttpUriRequest request, ResponseHandler<? extends T> responseHandler) throws IOException
HttpClient
execute
in interface HttpClient
T
- The Return Type Identified by the generic type of the ResponseHandler
request
- the request to executeresponseHandler
- the response handler
IOException
ClientProtocolException
- in case of an http protocol errorpublic <T> T execute(HttpUriRequest request, ResponseHandler<? extends T> responseHandler, HttpContext context) throws IOException
HttpClient
execute
in interface HttpClient
T
- The Return Type Identified by the generic type of the ResponseHandler
request
- the request to executeresponseHandler
- the response handlercontext
- the http context
IOException
ClientProtocolException
- in case of an http protocol errorpublic ClientConnectionManager getConnectionManager()
HttpClient
getConnectionManager
in interface HttpClient
public HttpParams getParams()
HttpClient
getParams
in interface HttpClient
public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws IOException
HttpClient
execute
in interface HttpClient
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 executecontext
- the context to use for the execution, or
null
to use the default context
IOException
ClientProtocolException
- in case of an http protocol errorpublic boolean supportsRangeAndContentRangeHeaders()
public boolean isSharedCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |