Top Description Methods
org.apache.hc.core5.http.nio.ssl

public Interface TlsStrategy

Known Direct Implementers
org.apache.hc.core5.http.nio.ssl.BasicClientTlsStrategy, org.apache.hc.core5.http.nio.ssl.BasicServerTlsStrategy
Imports
java.net.SocketAddress, org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.http.HttpHost, .URIScheme, org.apache.hc.core5.net.NamedEndpoint, org.apache.hc.core5.reactor.ssl.TransportSecurityLayer, org.apache.hc.core5.util.Timeout

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

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the session has been upgraded, false otherwise.
upgrade
(TransportSecurityLayer
the session layer
sessionLayer
,
HttpHost
the name of the opposite endpoint when given or null otherwise.
host
,
SocketAddress
the address of the local endpoint.
localAddress
,
SocketAddress
the address of the remote endpoint.
remoteAddress
,
Object
arbitrary object passes to the TLS session initialization code.
attachment
,
Timeout
the timeout to use while performing the TLS handshake; may be null.
handshakeTimeout
)

Secures current session layer with TLS.
public default void
upgrade(TransportSecurityLayer
the session layer
sessionLayer
,
NamedEndpoint
the name of the opposite endpoint when applicable or null otherwise.
endpoint
,
Object
arbitrary object passes to the TLS session initialization code.
attachment
,
Timeout
the timeout to use while performing the TLS handshake; may be null.
handshakeTimeout
,
FutureCallback<TransportSecurityLayer>
Operation result callback.
callback
)

Secures current session layer with TLS.

Method Detail

upgradeback to summary
public boolean upgrade(TransportSecurityLayer sessionLayer, HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, Timeout handshakeTimeout)

Secures current session layer with TLS.

Parameters
sessionLayer:TransportSecurityLayer

the session layer

host:HttpHost

the name of the opposite endpoint when given or null otherwise.

localAddress:SocketAddress

the address of the local endpoint.

remoteAddress:SocketAddress

the address of the remote endpoint.

attachment:Object

arbitrary object passes to the TLS session initialization code.

handshakeTimeout:Timeout

the timeout to use while performing the TLS handshake; may be null.

Returns:boolean

true if the session has been upgraded, false otherwise.

Annotations
@Deprecated
upgradeback to summary
public default void upgrade(TransportSecurityLayer sessionLayer, NamedEndpoint endpoint, Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)

Secures current session layer with TLS.

Parameters
sessionLayer:TransportSecurityLayer

the session layer

endpoint:NamedEndpoint

the name of the opposite endpoint when applicable or null otherwise.

attachment:Object

arbitrary object passes to the TLS session initialization code.

handshakeTimeout:Timeout

the timeout to use while performing the TLS handshake; may be null.

callback:FutureCallback<TransportSecurityLayer>

Operation result callback.

Since
5.2