Package org.apache.hc.core5.http2.ssl
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 java.lang.Object implements org.apache.hc.core5.http.nio.ssl.TlsStrategyDefault client-side implementation ofTlsStrategythat upgrades outbound connections with TLS security. This strategy will try to negotiate an application protocol using TLS ALPN extension based onHttpVersionPolicypassed 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 Summary
Constructors Constructor Description H2ClientTlsStrategy()H2ClientTlsStrategy(javax.net.ssl.SSLContext sslContext)H2ClientTlsStrategy(javax.net.ssl.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(javax.net.ssl.SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer initializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)H2ClientTlsStrategy(javax.net.ssl.SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)H2ClientTlsStrategy(org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)Constructor with the default SSL context based on system properties and customSSLSessionVerifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanupgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession, org.apache.hc.core5.http.HttpHost host, java.net.SocketAddress localAddress, java.net.SocketAddress remoteAddress, java.lang.Object attachment, org.apache.hc.core5.util.Timeout handshakeTimeout)voidupgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession, org.apache.hc.core5.net.NamedEndpoint endpoint, java.lang.Object attachment, org.apache.hc.core5.util.Timeout handshakeTimeout, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ssl.TransportSecurityLayer> callback)
-
-
-
Constructor Detail
-
H2ClientTlsStrategy
public H2ClientTlsStrategy(javax.net.ssl.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(javax.net.ssl.SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer initializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)
-
H2ClientTlsStrategy
public H2ClientTlsStrategy(javax.net.ssl.SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier verifier)
-
H2ClientTlsStrategy
public H2ClientTlsStrategy(javax.net.ssl.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 customSSLSessionVerifier.- Parameters:
verifier- the customSSLSessionVerifier.- Since:
- 5.2
- See Also:
SSLContext
-
-
Method Detail
-
upgrade
public void upgrade(org.apache.hc.core5.reactor.ssl.TransportSecurityLayer tlsSession, org.apache.hc.core5.net.NamedEndpoint endpoint, java.lang.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:
upgradein interfaceorg.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, java.net.SocketAddress localAddress, java.net.SocketAddress remoteAddress, java.lang.Object attachment, org.apache.hc.core5.util.Timeout handshakeTimeout)- Specified by:
upgradein interfaceorg.apache.hc.core5.http.nio.ssl.TlsStrategy
-
-