org.apache.hc.client5.http.impl.cache

## Class CachingHttpAsyncClientBuilder

- java.lang.Object
- - org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder
  - - org.apache.hc.client5.http.impl.cache.CachingHttpAsyncClientBuilder

-     public class CachingHttpAsyncClientBuilder
      extends HttpAsyncClientBuilder

  Builder for `CloseableHttpAsyncClient` instances capable of client-side caching.
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CachingHttpAsyncClientBuilder()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Function<org.apache.hc.core5.http.protocol.HttpContext,HttpClientContext>` | `contextAdaptor()`
    `static CachingHttpAsyncClientBuilder` | `create()`
    `protected void` | `customizeExecChain(org.apache.hc.core5.http.config.NamedElementChain<AsyncExecChainHandler> execChainDefinition)` Request exec chain customization and extension.
    `CachingHttpAsyncClientBuilder` | `setCacheConfig(CacheConfig cacheConfig)`
    `CachingHttpAsyncClientBuilder` | `setCacheDir(File cacheDir)`
    `CachingHttpAsyncClientBuilder` | `setDeleteCache(boolean deleteCache)`
    `CachingHttpAsyncClientBuilder` | `setHttpCacheInvalidator(HttpAsyncCacheInvalidator cacheInvalidator)` Deprecated. Do not use.
    `CachingHttpAsyncClientBuilder` | `setHttpCacheStorage(HttpAsyncCacheStorage storage)`
    `CachingHttpAsyncClientBuilder` | `setHttpCacheStorage(HttpCacheStorage storage)`
    `CachingHttpAsyncClientBuilder` | `setResourceFactory(ResourceFactory resourceFactory)`
    `CachingHttpAsyncClientBuilder` | `setSchedulingStrategy(SchedulingStrategy schedulingStrategy)`

    - ### Methods inherited from class org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder

      `addCloseable, addExecInterceptorAfter, addExecInterceptorBefore, addExecInterceptorFirst, addExecInterceptorLast, addRequestInterceptorFirst, addRequestInterceptorLast, addResponseInterceptorFirst, addResponseInterceptorLast, build, disableAuthCaching, disableAutomaticRetries, disableConnectionState, disableCookieManagement, disableRedirectHandling, evictExpiredConnections, evictIdleConnections, replaceExecInterceptor, setCharCodingConfig, setConnectionManager, setConnectionManagerShared, setConnectionReuseStrategy, setDefaultAuthSchemeRegistry, setDefaultCookieSpecRegistry, setDefaultCookieStore, setDefaultCredentialsProvider, setDefaultHeaders, setDefaultRequestConfig, setH2Config, setHttp1Config, setIOReactorConfig, setIoReactorExceptionCallback, setIoSessionDecorator, setIOSessionListener, setKeepAliveStrategy, setProxy, setProxyAuthenticationStrategy, setProxySelector, setRedirectStrategy, setRetryStrategy, setRoutePlanner, setSchemePortResolver, setTargetAuthenticationStrategy, setThreadFactory, setUserAgent, setUserTokenHandler, setVersionPolicy, useSystemProperties`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CachingHttpAsyncClientBuilder

          protected CachingHttpAsyncClientBuilder()

  - ### Method Detail

    - #### create

          public static CachingHttpAsyncClientBuilder create()

    - #### setResourceFactory

          public final CachingHttpAsyncClientBuilder setResourceFactory(ResourceFactory resourceFactory)

    - #### setHttpCacheStorage

          public final CachingHttpAsyncClientBuilder setHttpCacheStorage(HttpCacheStorage storage)

    - #### setHttpCacheStorage

          public final CachingHttpAsyncClientBuilder setHttpCacheStorage(HttpAsyncCacheStorage storage)

    - #### setCacheDir

          public final CachingHttpAsyncClientBuilder setCacheDir(File cacheDir)

    - #### setSchedulingStrategy

          public final CachingHttpAsyncClientBuilder setSchedulingStrategy(SchedulingStrategy schedulingStrategy)

    - #### setCacheConfig

          public final CachingHttpAsyncClientBuilder setCacheConfig(CacheConfig cacheConfig)

    - #### setHttpCacheInvalidator

          @Deprecated
          public final CachingHttpAsyncClientBuilder setHttpCacheInvalidator(HttpAsyncCacheInvalidator cacheInvalidator)

      Deprecated. Do not use.

    - #### setDeleteCache

          public CachingHttpAsyncClientBuilder setDeleteCache(boolean deleteCache)

    - #### customizeExecChain

          protected void customizeExecChain(org.apache.hc.core5.http.config.NamedElementChain<AsyncExecChainHandler> execChainDefinition)

      Description copied from class: `HttpAsyncClientBuilder`
      Request exec chain customization and extension.

      For internal use.

      Overrides:
        `customizeExecChain` in class `HttpAsyncClientBuilder`

    - #### contextAdaptor

          protected Function<org.apache.hc.core5.http.protocol.HttpContext,HttpClientContext> contextAdaptor()

      Overrides:
        `contextAdaptor` in class `HttpAsyncClientBuilder`

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.