Example usage for org.apache.http.impl.client.cache BasicHttpCache BasicHttpCache

List of usage examples for org.apache.http.impl.client.cache BasicHttpCache BasicHttpCache

Introduction

In this page you can find the example usage for org.apache.http.impl.client.cache BasicHttpCache BasicHttpCache.

Prototype

public BasicHttpCache(ResourceFactory resourceFactory, HttpCacheStorage storage, CacheConfig config) 

Source Link

Usage

From source file:org.apache.http.impl.client.cache.CachingExec.java

public CachingExec(final ClientExecChain backend, final ResourceFactory resourceFactory,
        final HttpCacheStorage storage, final CacheConfig config) {
    this(backend, new BasicHttpCache(resourceFactory, storage, config), config);
}

From source file:org.apache.http.impl.client.cache.CachingHttpAsyncClient.java

public CachingHttpAsyncClient(final HttpAsyncClient client, final ResourceFactory resourceFactory,
        final HttpCacheStorage storage, final CacheConfig config) {
    this(client, new BasicHttpCache(resourceFactory, storage, config), config);
}

From source file:org.apache.http.impl.client.cache.CachingHttpAsyncClient.java

public CachingHttpAsyncClient(final HttpAsyncClient client, final HttpCacheStorage storage,
        final CacheConfig config) {
    this(client, new BasicHttpCache(new HeapResourceFactory(), storage, config), config);
}

From source file:org.apache.http.impl.client.cache.CachingHttpClient.java

/**
 * Constructs a {@code CachingHttpClient} with the given caching options
 * that stores cache entries in the provided storage backend and uses
 * the given {@link HttpClient} for backend requests. However, cached
 * response bodies are managed using the given {@link ResourceFactory}.
 * @param client used to make origin requests
 * @param resourceFactory how to manage cached response bodies
 * @param storage where to store cache entries 
 * @param config cache module options/*from  w ww.  j  a v a 2s. c  om*/
 */
public CachingHttpClient(HttpClient client, ResourceFactory resourceFactory, HttpCacheStorage storage,
        CacheConfig config) {
    this(client, new BasicHttpCache(resourceFactory, storage, config), config);
}

From source file:org.apache.http.impl.client.cache.CachingHttpClient.java

/**
 * Constructs a {@code CachingHttpClient} with the given caching options
 * that stores cache entries in the provided storage backend and uses
 * the given {@link HttpClient} for backend requests.
 * @param client used to make origin requests
 * @param storage where to store cache entries 
 * @param config cache module options//from   w  w  w.j  a  va2  s . com
 */
public CachingHttpClient(HttpClient client, HttpCacheStorage storage, CacheConfig config) {
    this(client, new BasicHttpCache(new HeapResourceFactory(), storage, config), config);
}