Package org.omegazero.net.client.params
Class TLSConnectionParameters
java.lang.Object
org.omegazero.net.client.params.ConnectionParameters
org.omegazero.net.client.params.TLSConnectionParameters
Extended
ConnectionParameters for connections encrypted using TLS.-
Constructor Summary
ConstructorsConstructorDescriptionTLSConnectionParameters(SocketAddress remote) Creates newTLSConnectionParameters.TLSConnectionParameters(SocketAddress remote, SocketAddress local) Creates newTLSConnectionParameters. -
Method Summary
Modifier and TypeMethodDescriptionString[]Returns the configured ALPN options usingsetAlpnNames(String[]).String[]Returns the configured SNI options usingsetSniOptions(String[]).voidsetAlpnNames(String[] alpnNames) Sets the list of requested application layer protocol names to be negotiated using TLS ALPN (Application Layer Protocol Negotiation).voidsetSniOptions(String[] sniOptions) Sets the list of requested server names using TLS SNI (Server Name Indication).Methods inherited from class org.omegazero.net.client.params.ConnectionParameters
getLocal, getRemote
-
Constructor Details
-
TLSConnectionParameters
Creates newTLSConnectionParameters.- Parameters:
remote- The remote address
-
TLSConnectionParameters
Creates newTLSConnectionParameters.- Parameters:
remote- The remote addresslocal- The local address to bind to
-
-
Method Details
-
setAlpnNames
Sets the list of requested application layer protocol names to be negotiated using TLS ALPN (Application Layer Protocol Negotiation). The elements in this list should be ordered from most-preferred to least-preferred protocol name.- Parameters:
alpnNames- The list of requested protocol names- See Also:
-
getAlpnNames
Returns the configured ALPN options usingsetAlpnNames(String[]).- Returns:
- The configured ALPN options
-
setSniOptions
Sets the list of requested server names using TLS SNI (Server Name Indication).If not set or
nullis passed, SNI is disabled.- Parameters:
sniOptions- The list of requested server names
-
getSniOptions
Returns the configured SNI options usingsetSniOptions(String[]).- Returns:
- The configured SNI options
-