org.apache.hc.client5.http.ssl

## Class ClientTlsStrategyBuilder

- java.lang.Object
- - org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder

-     public class ClientTlsStrategyBuilder
      extends Object

  Builder for client `TlsStrategy` instances.

  When a particular component is not explicitly set this class will use its default implementation. System properties will be taken into account when configuring the default implementations when `useSystemProperties()` method is called prior to calling `build()`.

  - ssl.TrustManagerFactory.algorithm
  - javax.net.ssl.trustStoreType
  - javax.net.ssl.trustStore
  - javax.net.ssl.trustStoreProvider
  - javax.net.ssl.trustStorePassword
  - ssl.KeyManagerFactory.algorithm
  - javax.net.ssl.keyStoreType
  - javax.net.ssl.keyStore
  - javax.net.ssl.keyStoreProvider
  - javax.net.ssl.keyStorePassword
  - https.protocols
  - https.cipherSuites
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientTlsStrategyBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.hc.core5.http.nio.ssl.TlsStrategy` | `build()`
    `static ClientTlsStrategyBuilder` | `create()`
    `ClientTlsStrategyBuilder` | `setCiphers(String... ciphers)` Assigns enabled ciphers.
    `ClientTlsStrategyBuilder` | `setHostnameVerifier(HostnameVerifier hostnameVerifier)` Assigns `HostnameVerifier` instance.
    `ClientTlsStrategyBuilder` | `setSslBufferMode(org.apache.hc.core5.reactor.ssl.SSLBufferMode sslBufferMode)` Assigns `SSLBufferMode` value.
    `ClientTlsStrategyBuilder` | `setSslContext(SSLContext sslContext)` Assigns `SSLContext` instance.
    `ClientTlsStrategyBuilder` | `setTlsDetailsFactory(org.apache.hc.core5.function.Factory<SSLEngine,org.apache.hc.core5.reactor.ssl.TlsDetails> tlsDetailsFactory)` Assigns `TlsDetails` `Factory` instance.
    `ClientTlsStrategyBuilder` | `setTlsVersions(String... tlslVersions)` Assigns enabled `TLS` versions.
    `ClientTlsStrategyBuilder` | `setTlsVersions(org.apache.hc.core5.http.ssl.TLS... tlslVersions)` Assigns enabled `TLS` versions.
    `ClientTlsStrategyBuilder` | `useSystemProperties()` Use system properties when creating and configuring default implementations.

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

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

- - ### Constructor Detail

    - #### ClientTlsStrategyBuilder

          public ClientTlsStrategyBuilder()

  - ### Method Detail

    - #### create

          public static ClientTlsStrategyBuilder create()

    - #### setSslContext

          public ClientTlsStrategyBuilder setSslContext(SSLContext sslContext)

      Assigns `SSLContext` instance.

    - #### setTlsVersions

          public final ClientTlsStrategyBuilder setTlsVersions(String... tlslVersions)

      Assigns enabled `TLS` versions.

    - #### setTlsVersions

          public final ClientTlsStrategyBuilder setTlsVersions(org.apache.hc.core5.http.ssl.TLS... tlslVersions)

      Assigns enabled `TLS` versions.

    - #### setCiphers

          public final ClientTlsStrategyBuilder setCiphers(String... ciphers)

      Assigns enabled ciphers.

    - #### setSslBufferMode

          public ClientTlsStrategyBuilder setSslBufferMode(org.apache.hc.core5.reactor.ssl.SSLBufferMode sslBufferMode)

      Assigns `SSLBufferMode` value.

    - #### setHostnameVerifier

          public ClientTlsStrategyBuilder setHostnameVerifier(HostnameVerifier hostnameVerifier)

      Assigns `HostnameVerifier` instance.

    - #### setTlsDetailsFactory

          public ClientTlsStrategyBuilder setTlsDetailsFactory(org.apache.hc.core5.function.Factory<SSLEngine,org.apache.hc.core5.reactor.ssl.TlsDetails> tlsDetailsFactory)

      Assigns `TlsDetails` `Factory` instance.

    - #### useSystemProperties

          public final ClientTlsStrategyBuilder useSystemProperties()

      Use system properties when creating and configuring default implementations.

    - #### build

          public org.apache.hc.core5.http.nio.ssl.TlsStrategy build()

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