org.apache.hc.client5.http

## Class AbstractClientContextBuilder<T extends HttpClientContext>

- java.lang.Object
- - org.apache.hc.client5.http.AbstractClientContextBuilder<T>

- Type Parameters:
    `T` - The HttpClientContext type or subtype.
  Direct Known Subclasses:
    CacheContextBuilder, ContextBuilder

      public abstract class AbstractClientContextBuilder<T extends HttpClientContext>
      extends Object

  Abstract `HttpClientContext` builder.
  Since:
    5.4

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `build()`
    `protected abstract T` | `createContext()`
    `AbstractClientContextBuilder<T>` | `preemptiveAuth(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme)`
    `AbstractClientContextBuilder<T>` | `preemptiveBasicAuth(org.apache.hc.core5.http.HttpHost host, UsernamePasswordCredentials credentials)`
    `AbstractClientContextBuilder<T>` | `useAuthCache(AuthCache authCache)`
    `AbstractClientContextBuilder<T>` | `useAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry)`
    `AbstractClientContextBuilder<T>` | `useCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry)`
    `AbstractClientContextBuilder<T>` | `useCookieStore(CookieStore cookieStore)`
    `AbstractClientContextBuilder<T>` | `useCredentialsProvider(CredentialsProvider credentialsProvider)`

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

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

- - ### Constructor Detail

    - #### AbstractClientContextBuilder

          protected AbstractClientContextBuilder(SchemePortResolver schemePortResolver)

  - ### Method Detail

    - #### useCookieSpecRegistry

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

    - #### useAuthSchemeRegistry

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

    - #### useCookieStore

          public AbstractClientContextBuilder<T> useCookieStore(CookieStore cookieStore)

    - #### useCredentialsProvider

          public AbstractClientContextBuilder<T> useCredentialsProvider(CredentialsProvider credentialsProvider)

    - #### useAuthCache

          public AbstractClientContextBuilder<T> useAuthCache(AuthCache authCache)

    - #### preemptiveAuth

          public AbstractClientContextBuilder<T> preemptiveAuth(org.apache.hc.core5.http.HttpHost host,
                                                                AuthScheme authScheme)

    - #### preemptiveBasicAuth

          public AbstractClientContextBuilder<T> preemptiveBasicAuth(org.apache.hc.core5.http.HttpHost host,
                                                                     UsernamePasswordCredentials credentials)

    - #### createContext

          protected abstract T createContext()

    - #### build

          public T build()

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