Package org.apache.hc.core5.http2.ssl
Class H2ServerTlsStrategy
- java.lang.Object
-
- org.apache.hc.core5.http2.ssl.H2ServerTlsStrategy
-
- All Implemented Interfaces:
TlsStrategy
public class H2ServerTlsStrategy extends java.lang.Object implements TlsStrategy
Basic side-side implementation ofTlsStrategy
that upgrades to TLS for endpoints with the specified local ports.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private SSLSessionInitializer
initializer
private SecurePortStrategy
securePortStrategy
private SSLBufferMode
sslBufferMode
private javax.net.ssl.SSLContext
sslContext
private SSLSessionVerifier
verifier
-
Constructor Summary
Constructors Constructor Description H2ServerTlsStrategy()
H2ServerTlsStrategy(int... securePorts)
Deprecated.H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext)
H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy)
Deprecated.H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionVerifier verifier)
Deprecated.H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SSLSessionVerifier verifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private boolean
isApplicable(java.net.SocketAddress localAddress)
boolean
upgrade(TransportSecurityLayer tlsSession, HttpHost host, java.net.SocketAddress localAddress, java.net.SocketAddress remoteAddress, java.lang.Object attachment, Timeout handshakeTimeout)
void
upgrade(TransportSecurityLayer tlsSession, NamedEndpoint endpoint, java.lang.Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)
Secures current session layer with TLS.
-
-
-
Field Detail
-
sslContext
private final javax.net.ssl.SSLContext sslContext
-
securePortStrategy
private final SecurePortStrategy securePortStrategy
-
sslBufferMode
private final SSLBufferMode sslBufferMode
-
initializer
private final SSLSessionInitializer initializer
-
verifier
private final SSLSessionVerifier verifier
-
-
Constructor Detail
-
H2ServerTlsStrategy
@Deprecated public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
-
H2ServerTlsStrategy
@Deprecated public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
-
H2ServerTlsStrategy
@Deprecated public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy, SSLSessionVerifier verifier)
Deprecated.
-
H2ServerTlsStrategy
@Deprecated public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SecurePortStrategy securePortStrategy)
Deprecated.
-
H2ServerTlsStrategy
@Deprecated public H2ServerTlsStrategy(int... securePorts)
Deprecated.
-
H2ServerTlsStrategy
public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SSLBufferMode sslBufferMode, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
-
H2ServerTlsStrategy
public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SSLSessionInitializer initializer, SSLSessionVerifier verifier)
-
H2ServerTlsStrategy
public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext, SSLSessionVerifier verifier)
-
H2ServerTlsStrategy
public H2ServerTlsStrategy(javax.net.ssl.SSLContext sslContext)
-
H2ServerTlsStrategy
public H2ServerTlsStrategy()
-
-
Method Detail
-
isApplicable
private boolean isApplicable(java.net.SocketAddress localAddress)
-
upgrade
public void upgrade(TransportSecurityLayer tlsSession, NamedEndpoint endpoint, java.lang.Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)
Description copied from interface:TlsStrategy
Secures current session layer with TLS.- Specified by:
upgrade
in interfaceTlsStrategy
- Parameters:
tlsSession
- the session layerendpoint
- the name of the opposite endpoint when applicable ornull
otherwise.attachment
- arbitrary object passes to the TLS session initialization code.handshakeTimeout
- the timeout to use while performing the TLS handshake; may benull
.callback
- Operation result callback.
-
upgrade
@Deprecated public boolean upgrade(TransportSecurityLayer tlsSession, HttpHost host, java.net.SocketAddress localAddress, java.net.SocketAddress remoteAddress, java.lang.Object attachment, Timeout handshakeTimeout)
Description copied from interface:TlsStrategy
Secures current session layer with TLS.- Specified by:
upgrade
in interfaceTlsStrategy
- Parameters:
tlsSession
- the session layerhost
- the name of the opposite endpoint when given ornull
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 benull
.- Returns:
true
if the session has been upgraded,false
otherwise.
-
-