Class CachingHttpAsyncClients
java.lang.Object
org.apache.hc.client5.http.impl.cache.CachingHttpAsyncClients
Factory methods for
CloseableHttpAsyncClient instances
capable of client-side caching.- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClientcreateFileBound(File cacheDir) CreatesCloseableHttpAsyncClientinstance that uses a file system bound response cache.static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClientcreateHttp2FileBound(File cacheDir) Creates HTTP/2CloseableHttpAsyncClientinstance that uses a file system bound response cache.static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClientCreates HTTP/2CloseableHttpAsyncClientinstance that uses a memory bound response cache.static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClientCreatesCloseableHttpAsyncClientinstance that uses a memory bound response cache.custom()Creates builder object for construction of customCloseableHttpAsyncClientinstances.static CachingH2AsyncClientBuilderCreates builder object for construction of custom HTTP/2CloseableHttpAsyncClientinstances.
-
Method Details
-
custom
Creates builder object for construction of customCloseableHttpAsyncClientinstances. -
createMemoryBound
public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createMemoryBound()CreatesCloseableHttpAsyncClientinstance that uses a memory bound response cache. -
createFileBound
public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createFileBound(File cacheDir) CreatesCloseableHttpAsyncClientinstance that uses a file system bound response cache.- Parameters:
cacheDir- location of response cache.
-
customHttp2
Creates builder object for construction of custom HTTP/2CloseableHttpAsyncClientinstances. -
createHttp2MemoryBound
public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createHttp2MemoryBound()Creates HTTP/2CloseableHttpAsyncClientinstance that uses a memory bound response cache. -
createHttp2FileBound
public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createHttp2FileBound(File cacheDir) Creates HTTP/2CloseableHttpAsyncClientinstance that uses a file system bound response cache.- Parameters:
cacheDir- location of response cache.
-