org.apache.hc.client5.http.config

## Class TlsConfig.Builder

- java.lang.Object
- - org.apache.hc.client5.http.config.TlsConfig.Builder

- Enclosing class:
    TlsConfig

      public static class TlsConfig.Builder
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TlsConfig` | `build()`
    `TlsConfig.Builder` | `setHandshakeTimeout(long handshakeTimeout, TimeUnit timeUnit)`
    `TlsConfig.Builder` | `setHandshakeTimeout(org.apache.hc.core5.util.Timeout handshakeTimeout)` Determines the timeout used by TLS session negotiation exchanges (session handshake).
    `TlsConfig.Builder` | `setSupportedCipherSuites(String... supportedCipherSuites)` Determines supported cipher suites.
    `TlsConfig.Builder` | `setSupportedProtocols(String... supportedProtocols)` Determines supported TLS protocols.
    `TlsConfig.Builder` | `setSupportedProtocols(org.apache.hc.core5.http.ssl.TLS... supportedProtocols)` Determines supported TLS protocols.
    `TlsConfig.Builder` | `setVersionPolicy(org.apache.hc.core5.http2.HttpVersionPolicy versionPolicy)` Determines the HTTP protocol policy.

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder()

  - ### Method Detail

    - #### setHandshakeTimeout

          public TlsConfig.Builder setHandshakeTimeout(org.apache.hc.core5.util.Timeout handshakeTimeout)

      Determines the timeout used by TLS session negotiation exchanges (session handshake).

      A timeout value of zero is interpreted as an infinite timeout.

      Default: `null` (undefined)

      Returns:
        this instance.

    - #### setHandshakeTimeout

          public TlsConfig.Builder setHandshakeTimeout(long handshakeTimeout,
                                                       TimeUnit timeUnit)

      Returns:
        this instance.
      See Also:
        `setHandshakeTimeout(Timeout)`

    - #### setSupportedProtocols

          public TlsConfig.Builder setSupportedProtocols(String... supportedProtocols)

      Determines supported TLS protocols.

      Default: `null` (undefined)

      Returns:
        this instance.

    - #### setSupportedProtocols

          public TlsConfig.Builder setSupportedProtocols(org.apache.hc.core5.http.ssl.TLS... supportedProtocols)

      Determines supported TLS protocols.

      Default: `null` (undefined)

      Returns:
        this instance.

    - #### setSupportedCipherSuites

          public TlsConfig.Builder setSupportedCipherSuites(String... supportedCipherSuites)

      Determines supported cipher suites.

      Default: `null` (undefined)

      Returns:
        this instance.

    - #### setVersionPolicy

          public TlsConfig.Builder setVersionPolicy(org.apache.hc.core5.http2.HttpVersionPolicy versionPolicy)

      Determines the HTTP protocol policy. By default, connections are expected to use TLS ALPN extension to negotiate the application protocol to be used by both endpoints.

      Default: `HttpVersionPolicy.NEGOTIATE`

      Returns:
        this instance.

    - #### build

          public TlsConfig build()

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