org.apache.hc.core5.http.nio.ssl

## Interface TlsStrategy

- All Known Implementing Classes:
    BasicClientTlsStrategy, BasicServerTlsStrategy, ConscryptClientTlsStrategy, ConscryptServerTlsStrategy, H2ClientTlsStrategy, H2ServerTlsStrategy

      public interface TlsStrategy

  TLS protocol upgrade strategy for non-blocking `TransportSecurityLayer` sessions.
  Since:
    5.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `upgrade(TransportSecurityLayer sessionLayer, HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, Timeout handshakeTimeout)` Deprecated. use `upgrade(TransportSecurityLayer, NamedEndpoint, Object, Timeout, FutureCallback)`
    `default void` | `upgrade(TransportSecurityLayer sessionLayer, NamedEndpoint endpoint, Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)` Secures current session layer with TLS.

- - ### Method Detail

    - #### upgrade

          @Deprecated
          boolean upgrade(TransportSecurityLayer sessionLayer,
                                      HttpHost host,
                                      SocketAddress localAddress,
                                      SocketAddress remoteAddress,
                                      Object attachment,
                                      Timeout handshakeTimeout)

      Deprecated. use `upgrade(TransportSecurityLayer, NamedEndpoint, Object, Timeout, FutureCallback)`
      Secures current session layer with TLS.
      Parameters:
        `sessionLayer` - the session layer
        `host` - the name of the opposite endpoint when given or `null` otherwise.
        `localAddress` - the address of the local endpoint.
        `remoteAddress` - the address of the remote endpoint.
        `attachment` - arbitrary object passes to the TLS session initialization code.
        `handshakeTimeout` - the timeout to use while performing the TLS handshake; may be `null`.
      Returns:
        `true` if the session has been upgraded, `false` otherwise.

    - #### upgrade

          default void upgrade(TransportSecurityLayer sessionLayer,
                               NamedEndpoint endpoint,
                               Object attachment,
                               Timeout handshakeTimeout,
                               FutureCallback<TransportSecurityLayer> callback)

      Secures current session layer with TLS.
      Parameters:
        `sessionLayer` - the session layer
        `endpoint` - the name of the opposite endpoint when applicable or `null` otherwise.
        `attachment` - arbitrary object passes to the TLS session initialization code.
        `handshakeTimeout` - the timeout to use while performing the TLS handshake; may be `null`.
        `callback` - Operation result callback.
      Since:
        5.2

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