public class ProtonClientOptions extends NetClientOptions
ProtonClient connect operations.DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVALDEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALLDEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERSDEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
ProtonClientOptions() |
ProtonClientOptions(JsonObject json)
Create options from JSON
|
ProtonClientOptions(ProtonClientOptions other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
ProtonClientOptions |
addCrlPath(String crlPath)
Add a CRL path
|
ProtonClientOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
ProtonClientOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite, appended to the ordered suites.
|
ProtonClientOptions |
addEnabledSaslMechanism(String saslMechanism)
Adds a mechanism name that the client may use during SASL negotiation.
|
ProtonClientOptions |
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.
|
boolean |
equals(Object obj) |
Set<String> |
getEnabledSaslMechanisms()
Get the mechanisms the client should be restricted to use.
|
int |
getHeartbeat()
Return the heartbeat (in milliseconds) as maximum delay between sending frames for the remote peers.
|
int |
getMaxFrameSize()
Gets the maximum frame size for the connection.
|
String |
getSniServerName()
Get the hostname override for TLS SNI Server Name set by
setSniServerName(String). |
String |
getVirtualHost()
Get the virtual host name override for the connection AMQP Open frame and TLS SNI server name (if TLS is in use)
set by
setVirtualHost(String). |
int |
hashCode() |
ProtonClientOptions |
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.
|
ProtonClientOptions |
setConnectTimeout(int connectTimeout)
Set the connect timeout
|
ProtonClientOptions |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.
|
ProtonClientOptions |
setHeartbeat(int heartbeat)
Set the heartbeat (in milliseconds) as maximum delay between sending frames for the remote peers.
|
ProtonClientOptions |
setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
Set the hostname verification algorithm interval
To disable hostname verification, set hostnameVerificationAlgorithm to an empty String
|
ProtonClientOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.
|
ProtonClientOptions |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.
|
ProtonClientOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
ProtonClientOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
ProtonClientOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
ProtonClientOptions |
setLocalAddress(String localAddress)
Set the local interface to bind for network connections.
|
ProtonClientOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
ProtonClientOptions |
setMaxFrameSize(int maxFrameSize)
Sets the maximum frame size for the connection.
|
ProtonClientOptions |
setMetricsName(String metricsName)
Set the metrics name identifying the reported metrics, useful for grouping metrics
with the same name.
|
ProtonClientOptions |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
ProtonClientOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
ProtonClientOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
ProtonClientOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
ProtonClientOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
ProtonClientOptions |
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for connections via CONNECT proxy (e.g.
|
ProtonClientOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
ProtonClientOptions |
setReconnectAttempts(int attempts)
Set the value of reconnect attempts
|
ProtonClientOptions |
setReconnectInterval(long interval)
Set the reconnect interval
|
ProtonClientOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
ProtonClientOptions |
setReusePort(boolean reusePort)
Set the value of reuse port.
|
ProtonClientOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
ProtonClientOptions |
setSniServerName(String sniServerName)
Explicitly override the hostname to use for the TLS SNI server name.
|
ProtonClientOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
ProtonClientOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
ProtonClientOptions |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
ProtonClientOptions |
setTcpCork(boolean tcpCork)
Enable the
TCP_CORK option - only with linux native transport. |
ProtonClientOptions |
setTcpFastOpen(boolean tcpFastOpen)
Enable the
TCP_FASTOPEN option - only with linux native transport. |
ProtonClientOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
ProtonClientOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
ProtonClientOptions |
setTcpQuickAck(boolean tcpQuickAck)
Enable the
TCP_QUICKACK option - only with linux native transport. |
ProtonClientOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
ProtonClientOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted
|
ProtonClientOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
ProtonClientOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
ProtonClientOptions |
setUseAlpn(boolean useAlpn)
Set the ALPN usage.
|
ProtonClientOptions |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
ProtonClientOptions |
setVirtualHost(String virtualHost)
Override the hostname value used in the connection AMQP Open frame and TLS SNI server name (if TLS is in use).
|
JsonObject |
toJson()
Convert to JSON
|
getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, setSslHandshakeTimeout, setSslHandshakeTimeoutUnitgetConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAllgetCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, isUsePooledBuffersgetLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic ProtonClientOptions()
public ProtonClientOptions(ProtonClientOptions other)
other - the options to copypublic ProtonClientOptions(JsonObject json)
json - the JSONpublic JsonObject toJson()
toJson in class ClientOptionsBasepublic Set<String> getEnabledSaslMechanisms()
public ProtonClientOptions addEnabledSaslMechanism(String saslMechanism)
saslMechanism - the sasl mechanism name .public ProtonClientOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class NetClientOptionssendBufferSize - the buffers size, in bytespublic ProtonClientOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class NetClientOptionsreceiveBufferSize - the buffers size, in bytespublic ProtonClientOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class NetClientOptionsreuseAddress - the value of reuse addresspublic ProtonClientOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class NetClientOptionstrafficClass - the value of traffic classpublic ProtonClientOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class NetClientOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public ProtonClientOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class NetClientOptionstcpKeepAlive - true if TCP keep alive is enabledpublic ProtonClientOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class NetClientOptionssoLinger - true if SO_linger is enabledpublic ProtonClientOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptionssetUsePooledBuffers in class NetClientOptionsusePooledBuffers - true if pooled buffers enabledpublic ProtonClientOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setIdleTimeout in class NetClientOptionsidleTimeout - the timeout, in secondspublic ProtonClientOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptionssetIdleTimeoutUnit in class NetClientOptionsidleTimeoutUnit - specify time unit.public ProtonClientOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class NetClientOptionsssl - true if enabledpublic ProtonClientOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class NetClientOptionsoptions - the key store in jks formatpublic ProtonClientOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class NetClientOptionsoptions - the key cert options in pfx formatpublic ProtonClientOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class NetClientOptionsoptions - the options in pem formatpublic ProtonClientOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class NetClientOptionsoptions - the trust options in jks formatpublic ProtonClientOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class NetClientOptionsoptions - the trust options in pem formatpublic ProtonClientOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class NetClientOptionsoptions - the trust options in pfx formatpublic ProtonClientOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class NetClientOptionssuite - the suitepublic ProtonClientOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class NetClientOptionscrlPath - the pathNullPointerExceptionpublic ProtonClientOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class NetClientOptionscrlValue - the valueNullPointerExceptionpublic ProtonClientOptions setTrustAll(boolean trustAll)
ClientOptionsBasesetTrustAll in class NetClientOptionstrustAll - true if all should be trustedpublic ProtonClientOptions setConnectTimeout(int connectTimeout)
ClientOptionsBasesetConnectTimeout in class NetClientOptionsconnectTimeout - connect timeout, in mspublic ProtonClientOptions setReconnectAttempts(int attempts)
NetClientOptionssetReconnectAttempts in class NetClientOptionsattempts - the maximum number of reconnect attemptspublic ProtonClientOptions setReconnectInterval(long interval)
NetClientOptionssetReconnectInterval in class NetClientOptionsinterval - the reconnect interval in mspublic int hashCode()
hashCode in class NetClientOptionspublic boolean equals(Object obj)
equals in class NetClientOptionspublic ProtonClientOptions setUseAlpn(boolean useAlpn)
TCPSSLOptionssetUseAlpn in class NetClientOptionsuseAlpn - true when Application-Layer Protocol Negotiation should be usedpublic ProtonClientOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsaddEnabledSecureTransportProtocol in class NetClientOptionsprotocol - the SSL/TLS protocol to enablepublic ProtonClientOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
NetClientOptionssetHostnameVerificationAlgorithm in class NetClientOptionshostnameVerificationAlgorithm - should be HTTPS, LDAPS or an empty Stringpublic ProtonClientOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class NetClientOptionsoptions - the key store optionspublic ProtonClientOptions setLogActivity(boolean logEnabled)
NetworkOptionssetLogActivity in class NetClientOptionslogEnabled - true for logging the network activitypublic ProtonClientOptions setMetricsName(String metricsName)
ClientOptionsBasesetMetricsName in class NetClientOptionsmetricsName - the metrics namepublic ProtonClientOptions setProxyOptions(ProxyOptions proxyOptions)
ClientOptionsBasesetProxyOptions in class NetClientOptionsproxyOptions - proxy options objectpublic ProtonClientOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class NetClientOptionsoptions - the trust optionspublic ProtonClientOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class NetClientOptionspublic ProtonClientOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class NetClientOptionspublic ProtonClientOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class NetClientOptionssslEngineOptions - the ssl engine to usepublic ProtonClientOptions setLocalAddress(String localAddress)
ClientOptionsBasesetLocalAddress in class NetClientOptionslocalAddress - the local addresspublic ProtonClientOptions setReusePort(boolean reusePort)
NetworkOptionssetReusePort in class NetClientOptionsreusePort - the value of reuse portpublic ProtonClientOptions setTcpCork(boolean tcpCork)
TCPSSLOptionsTCP_CORK option - only with linux native transport.setTcpCork in class NetClientOptionstcpCork - the cork valuepublic ProtonClientOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptionsTCP_FASTOPEN option - only with linux native transport.setTcpFastOpen in class NetClientOptionstcpFastOpen - the fast open valuepublic ProtonClientOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptionsTCP_QUICKACK option - only with linux native transport.setTcpQuickAck in class NetClientOptionstcpQuickAck - the quick ack valuepublic ProtonClientOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsremoveEnabledSecureTransportProtocol in class NetClientOptionsprotocol - the SSL/TLS protocol to disablepublic ProtonClientOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptionssetEnabledSecureTransportProtocols in class NetClientOptionsenabledSecureTransportProtocols - the SSL/TLS protocols to enablepublic ProtonClientOptions setVirtualHost(String virtualHost)
ProtonClient.connect(java.lang.String, int, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.proton.ProtonConnection>>) will be used for both, with SNI performed
implicit where a FQDN was specified.
The SNI server name can also be overridden explicitly using setSniServerName(String).virtualHost - hostname to setpublic String getVirtualHost()
setVirtualHost(String).public ProtonClientOptions setSniServerName(String sniServerName)
virtualhost or SNI server name is explicitly
overridden, the hostname specified in ProtonClient.connect(java.lang.String, int, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.proton.ProtonConnection>>) will be used, with SNI performed implicitly
where a FQDN was specified.
This method should typically only be needed to set different values for the [virtual] hostname and SNI server name.sniServerName - hostname to set as SNI server namepublic String getSniServerName()
setSniServerName(String).public ProtonClientOptions setHeartbeat(int heartbeat)
heartbeat - hearthbeat maximum delaypublic int getHeartbeat()
public ProtonClientOptions setMaxFrameSize(int maxFrameSize)
If this property is not set explicitly, a reasonable default value is used.
Setting this property to a negative value will result in no maximum frame size being announced at all.
maxFrameSize - The frame size in bytes.public int getMaxFrameSize()
If this property is not set explicitly, a reasonable default value is used.
Copyright © 2020. All rights reserved.