org.apache.hc.client5.http.cache

## Class CacheContextBuilder

- java.lang.Object
- - org.apache.hc.client5.http.AbstractClientContextBuilder<HttpCacheContext>
  - - org.apache.hc.client5.http.cache.CacheContextBuilder

-     public class CacheContextBuilder
      extends AbstractClientContextBuilder<HttpCacheContext>

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CacheContextBuilder(SchemePortResolver schemePortResolver)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpCacheContext` | `build()`
    `static CacheContextBuilder` | `create()`
    `static CacheContextBuilder` | `create(SchemePortResolver schemePortResolver)`
    `protected HttpCacheContext` | `createContext()`
    `CacheContextBuilder` | `preemptiveAuth(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme)`
    `CacheContextBuilder` | `preemptiveBasicAuth(org.apache.hc.core5.http.HttpHost host, UsernamePasswordCredentials credentials)`
    `CacheContextBuilder` | `setCacheControl(RequestCacheControl cacheControl)`
    `CacheContextBuilder` | `useAuthCache(AuthCache authCache)`
    `CacheContextBuilder` | `useAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry)`
    `CacheContextBuilder` | `useCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry)`
    `CacheContextBuilder` | `useCookieStore(CookieStore cookieStore)`
    `CacheContextBuilder` | `useCredentialsProvider(CredentialsProvider credentialsProvider)`

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

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

- - ### Constructor Detail

    - #### CacheContextBuilder

          protected CacheContextBuilder(SchemePortResolver schemePortResolver)

  - ### Method Detail

    - #### create

          public static CacheContextBuilder create(SchemePortResolver schemePortResolver)

    - #### create

          public static CacheContextBuilder create()

    - #### useCookieSpecRegistry

          public CacheContextBuilder useCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry)

      Overrides:
        `useCookieSpecRegistry` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### useAuthSchemeRegistry

          public CacheContextBuilder useAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry)

      Overrides:
        `useAuthSchemeRegistry` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### useCookieStore

          public CacheContextBuilder useCookieStore(CookieStore cookieStore)

      Overrides:
        `useCookieStore` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### useCredentialsProvider

          public CacheContextBuilder useCredentialsProvider(CredentialsProvider credentialsProvider)

      Overrides:
        `useCredentialsProvider` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### useAuthCache

          public CacheContextBuilder useAuthCache(AuthCache authCache)

      Overrides:
        `useAuthCache` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### preemptiveAuth

          public CacheContextBuilder preemptiveAuth(org.apache.hc.core5.http.HttpHost host,
                                                    AuthScheme authScheme)

      Overrides:
        `preemptiveAuth` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### preemptiveBasicAuth

          public CacheContextBuilder preemptiveBasicAuth(org.apache.hc.core5.http.HttpHost host,
                                                         UsernamePasswordCredentials credentials)

      Overrides:
        `preemptiveBasicAuth` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### setCacheControl

          public CacheContextBuilder setCacheControl(RequestCacheControl cacheControl)

    - #### createContext

          protected HttpCacheContext createContext()

      Specified by:
        `createContext` in class `AbstractClientContextBuilder<HttpCacheContext>`

    - #### build

          public HttpCacheContext build()

      Overrides:
        `build` in class `AbstractClientContextBuilder<HttpCacheContext>`

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