Class H2ClientTlsStrategy

java.lang.Object
org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy
All Implemented Interfaces:
org.apache.hc.core5.http.nio.ssl.TlsStrategy

public class H2ClientTlsStrategy extends Object implements org.apache.hc.core5.http.nio.ssl.TlsStrategy
Default client-side implementation of TlsStrategy that upgrades outbound connections with TLS security. This strategy will try to negotiate an application protocol using TLS ALPN extension based on HttpVersionPolicy passed to the strategy as an attachment. The strategy will also enforce restrictions on TLS parameters required by the HTTP/2 specification.
Since:
5.0
  • Constructor Details

    • H2ClientTlsStrategy

      public H2ClientTlsStrategy(SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLBufferMode sslBufferMode, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer initializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)
    • H2ClientTlsStrategy

      public H2ClientTlsStrategy(SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer initializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)
    • H2ClientTlsStrategy

      public H2ClientTlsStrategy(SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)
    • H2ClientTlsStrategy

      public H2ClientTlsStrategy(SSLContext sslContext)
    • H2ClientTlsStrategy

      public H2ClientTlsStrategy()
    • H2ClientTlsStrategy

      public H2ClientTlsStrategy(org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)
      Constructor with the default SSL context based on system properties and custom SSLSessionVerifier.
      Parameters:
      verifier - the custom SSLSessionVerifier.
      Since:
      5.2
      See Also:
  • Method Details

    • upgrade

      public void upgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession, org.apache.hc.core5.net.NamedEndpoint endpoint, Object attachment, org.apache.hc.core5.util.Timeout handshakeTimeout, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ssl.TransportSecurityLayer> callback)
      Specified by:
      upgrade in interface org.apache.hc.core5.http.nio.ssl.TlsStrategy
    • upgrade

      @Deprecated public boolean upgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession, org.apache.hc.core5.http.HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, org.apache.hc.core5.util.Timeout handshakeTimeout)
      Specified by:
      upgrade in interface org.apache.hc.core5.http.nio.ssl.TlsStrategy