Package org.apache.hc.core5.http.nio.ssl
Interface TlsStrategy
-
- All Known Implementing Classes:
BasicClientTlsStrategy,BasicServerTlsStrategy,H2ClientTlsStrategy,H2ServerTlsStrategy
public interface TlsStrategyTLS protocol upgrade strategy for non-blockingTransportSecurityLayersessions.- Since:
- 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanupgrade(TransportSecurityLayer sessionLayer, HttpHost host, java.net.SocketAddress localAddress, java.net.SocketAddress remoteAddress, java.lang.Object attachment, Timeout handshakeTimeout)default voidupgrade(TransportSecurityLayer sessionLayer, NamedEndpoint endpoint, java.lang.Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)Secures current session layer with TLS.
-
-
-
Method Detail
-
upgrade
@Deprecated boolean upgrade(TransportSecurityLayer sessionLayer, HttpHost host, java.net.SocketAddress localAddress, java.net.SocketAddress remoteAddress, java.lang.Object attachment, Timeout handshakeTimeout)
Secures current session layer with TLS.- Parameters:
sessionLayer- the session layerhost- the name of the opposite endpoint when given ornullotherwise.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:
trueif the session has been upgraded,falseotherwise.
-
upgrade
default void upgrade(TransportSecurityLayer sessionLayer, NamedEndpoint endpoint, java.lang.Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)
Secures current session layer with TLS.- Parameters:
sessionLayer- the session layerendpoint- the name of the opposite endpoint when applicable ornullotherwise.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.- Since:
- 5.2
-
-