Class CachingHttpAsyncClients

java.lang.Object
org.apache.hc.client5.http.impl.cache.CachingHttpAsyncClients

public final class CachingHttpAsyncClients extends Object
Factory methods for CloseableHttpAsyncClient instances capable of client-side caching.
Since:
5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient
    Creates CloseableHttpAsyncClient instance that uses a file system bound response cache.
    static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient
    Creates HTTP/2 CloseableHttpAsyncClient instance that uses a file system bound response cache.
    static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient
    Creates HTTP/2 CloseableHttpAsyncClient instance that uses a memory bound response cache.
    static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient
    Creates CloseableHttpAsyncClient instance that uses a memory bound response cache.
    Creates builder object for construction of custom CloseableHttpAsyncClient instances.
    Creates builder object for construction of custom HTTP/2 CloseableHttpAsyncClient instances.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • custom

      public static CachingHttpAsyncClientBuilder custom()
      Creates builder object for construction of custom CloseableHttpAsyncClient instances.
    • createMemoryBound

      public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createMemoryBound()
      Creates CloseableHttpAsyncClient instance that uses a memory bound response cache.
    • createFileBound

      public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createFileBound(File cacheDir)
      Creates CloseableHttpAsyncClient instance that uses a file system bound response cache.
      Parameters:
      cacheDir - location of response cache.
    • customHttp2

      public static CachingH2AsyncClientBuilder customHttp2()
      Creates builder object for construction of custom HTTP/2 CloseableHttpAsyncClient instances.
    • createHttp2MemoryBound

      public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createHttp2MemoryBound()
      Creates HTTP/2 CloseableHttpAsyncClient instance that uses a memory bound response cache.
    • createHttp2FileBound

      public static org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient createHttp2FileBound(File cacheDir)
      Creates HTTP/2 CloseableHttpAsyncClient instance that uses a file system bound response cache.
      Parameters:
      cacheDir - location of response cache.