Class AmqpClientOptions
java.lang.Object
io.vertx.core.net.NetworkOptions
io.vertx.core.net.TCPSSLOptions
io.vertx.core.net.ClientOptionsBase
io.vertx.core.net.NetClientOptions
io.vertx.proton.ProtonClientOptions
io.vertx.amqp.AmqpClientOptions
public class AmqpClientOptions
extends io.vertx.proton.ProtonClientOptions
Configures the AMQP Client.
You can also configure the underlying Proton instance. Refer to
ProtonClientOptions for details.-
Field Summary
Fields inherited from class NetClientOptions
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL, DEFAULT_REGISTER_WRITE_HANDLERFields inherited from class ClientOptionsBase
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAMEFields inherited from class TCPSSLOptions
DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEAPLIVE_COUNT, DEFAULT_TCP_KEEAPLIVE_IDLE_SECONDS, DEFAULT_TCP_KEEAPLIVE_INTERVAL_SECONDS, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_WRITE_IDLE_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCrlPath(String crlPath) Add a CRL pathaddCrlValue(Buffer crlValue) Add a CRL valueaddEnabledCipherSuite(String suite) Add an enabled cipher suite, appended to the ordered suites.addEnabledSaslMechanism(String saslMechanism) addEnabledSecureTransportProtocol(String protocol) Add an enabled SSL/TLS protocols, appended to the ordered protocols.Get the connection hostname override for the AMQP Open frame hostnamegetHost()intgetPort()removeEnabledSecureTransportProtocol(String protocol) Removes an enabled SSL/TLS protocol from the ordered protocols.setConnectionHostname(String hostname) Explicitly override the hostname value used for the AMQP Open frame.setConnectTimeout(int connectTimeout) Set the connect timeoutsetContainerId(String containerId) Sets the container id.setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) Sets the list of enabled SSL/TLS protocols.setHeartbeat(int heartbeat) Sets the host.setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm) Set the hostname verification algorithm interval To disable hostname verification, set hostnameVerificationAlgorithm to an empty StringsetIdleTimeout(int idleTimeout) Set the idle timeout, default time unit is seconds.setIdleTimeoutUnit(TimeUnit idleTimeoutUnit) Set the idle timeout unit.setKeyCertOptions(KeyCertOptions options) Set the key/cert options.setLocalAddress(String localAddress) Set the local interface to bind for network connections.setMaxFrameSize(int maxFrameSize) setPassword(String pwd) Sets the password.setPort(int port) Sets the port.setReceiveBufferSize(int receiveBufferSize) Set the TCP receive buffer sizesetReconnectAttempts(int attempts) Set the value of reconnect attemptssetReconnectInterval(long interval) Set the reconnect intervalsetReuseAddress(boolean reuseAddress) Set the value of reuse addresssetReusePort(boolean reusePort) Set the value of reuse port.setSendBufferSize(int sendBufferSize) Set the TCP send buffer sizesetSniServerName(String sniServerName) setSoLinger(int soLinger) Set whether SO_linger keep alive is enabledsetSsl(boolean ssl) Set whether SSL/TLS is enabledsetSslEngineOptions(SSLEngineOptions sslEngineOptions) Set to use SSL engine implementation to use.setSslHandshakeTimeout(long sslHandshakeTimeout) Set the SSL handshake timeout, default time unit is seconds.setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit) Set the SSL handshake timeout unit.setTcpCork(boolean tcpCork) Enable theTCP_CORKoption - only with linux native transport.setTcpFastOpen(boolean tcpFastOpen) Enable theTCP_FASTOPENoption - only with linux native transport.setTcpKeepAlive(boolean tcpKeepAlive) Set whether TCP keep alive is enabledsetTcpNoDelay(boolean tcpNoDelay) Set whether TCP no delay is enabledsetTcpQuickAck(boolean tcpQuickAck) Enable theTCP_QUICKACKoption - only with linux native transport.setTrafficClass(int trafficClass) Set the value of traffic classsetTrustAll(boolean trustAll) Set whether all server certificates should be trustedsetTrustOptions(TrustOptions options) Set the trust options.setUsername(String username) Sets the username.setVirtualHost(String virtualHost) toJson()Convert to JSONMethods inherited from class io.vertx.proton.ProtonClientOptions
equals, getAuthorizationId, getEnabledSaslMechanisms, getHeartbeat, getMaxFrameSize, getSniServerName, getVirtualHost, hashCode, setAuthorizationId, setLogActivity, setMetricsName, setProxyOptions, setUseAlpnMethods inherited from class NetClientOptions
addNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, isRegisterWriteHandler, removeEnabledCipherSuite, setActivityLogDataFormat, setApplicationLayerProtocols, setNonProxyHosts, setReadIdleTimeout, setRegisterWriteHandler, setTcpUserTimeout, setWriteIdleTimeoutMethods inherited from class ClientOptionsBase
createSSLOptions, getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getOrCreateSSLOptions, getProxyOptions, getSslOptions, isTrustAllMethods inherited from class TCPSSLOptions
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getKeyCertOptions, getReadIdleTimeout, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTcpKeepAliveCount, getTcpKeepAliveIdleSeconds, getTcpKeepAliveIntervalSeconds, getTcpUserTimeout, getTrafficClass, getTransportOptions, getTrustOptions, getWriteIdleTimeout, isReuseAddress, isReusePort, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setTcpKeepAliveCount, setTcpKeepAliveIdleSeconds, setTcpKeepAliveIntervalSecondsMethods inherited from class NetworkOptions
getActivityLogDataFormat, getLogActivity
-
Constructor Details
-
AmqpClientOptions
public AmqpClientOptions() -
AmqpClientOptions
-
AmqpClientOptions
-
-
Method Details
-
toJson
Description copied from class:ClientOptionsBaseConvert to JSON- Overrides:
toJsonin classio.vertx.proton.ProtonClientOptions- Returns:
- the JSON
-
getHost
- Returns:
- the host.
-
setHost
Sets the host.- Parameters:
host- the host, must not benullwhen the client attempt to connect. Defaults to system variableamqp-client-hostand toAMQP_CLIENT_HOSTenvironment variable- Returns:
- the current
AmqpClientOptions
-
getPort
public int getPort()- Returns:
- the port.
-
setPort
Sets the port.- Parameters:
port- the port, defaults to system variableamqp-client-portand toAMQP_CLIENT_PORTenvironment variable and if neither is set5672.- Returns:
- the current
AmqpClientOptions
-
getUsername
- Returns:
- the username
-
setUsername
Sets the username.- Parameters:
username- the username, defaults to system variableamqp-client-usernameand toAMQP_CLIENT_USERNAMEenvironment variable.- Returns:
- the current
AmqpClientOptions
-
getPassword
- Returns:
- the password
-
setPassword
Sets the password.- Parameters:
pwd- the password, defaults to system variableamqp-client-passwordand toAMQP_CLIENT_PASSWORDenvironment variable.- Returns:
- the current
AmqpClientOptions
-
getContainerId
- Returns:
- the container id.
-
setContainerId
Sets the container id.- Parameters:
containerId- the container id- Returns:
- the current
AmqpClientOptions
-
getConnectionHostname
Get the connection hostname override for the AMQP Open frame hostname- Returns:
- the hostname override
-
setConnectionHostname
Explicitly override the hostname value used for the AMQP Open frame. The host connected to as persetHost(String)will be used in the Open frame by default.- Parameters:
hostname- the hostname override value to use as the Open frame hostname- Returns:
- current AmqpClientOptions instance
-
addEnabledSaslMechanism
- Overrides:
addEnabledSaslMechanismin classio.vertx.proton.ProtonClientOptions- See Also:
-
setSendBufferSize
Description copied from class:NetworkOptionsSet the TCP send buffer size- Overrides:
setSendBufferSizein classio.vertx.proton.ProtonClientOptions- Parameters:
sendBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setReceiveBufferSize
Description copied from class:NetworkOptionsSet the TCP receive buffer size- Overrides:
setReceiveBufferSizein classio.vertx.proton.ProtonClientOptions- Parameters:
receiveBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setReuseAddress
Description copied from class:NetworkOptionsSet the value of reuse address- Overrides:
setReuseAddressin classio.vertx.proton.ProtonClientOptions- Parameters:
reuseAddress- the value of reuse address- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setTrafficClass
Description copied from class:NetworkOptionsSet the value of traffic class- Overrides:
setTrafficClassin classio.vertx.proton.ProtonClientOptions- Parameters:
trafficClass- the value of traffic class- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setTcpNoDelay
Description copied from class:TCPSSLOptionsSet whether TCP no delay is enabled- Overrides:
setTcpNoDelayin classio.vertx.proton.ProtonClientOptions- Parameters:
tcpNoDelay- true if TCP no delay is enabled (Nagle disabled)- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setTcpKeepAlive
Description copied from class:TCPSSLOptionsSet whether TCP keep alive is enabled- Overrides:
setTcpKeepAlivein classio.vertx.proton.ProtonClientOptions- Parameters:
tcpKeepAlive- true if TCP keep alive is enabled- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setSoLinger
Description copied from class:TCPSSLOptionsSet whether SO_linger keep alive is enabled- Overrides:
setSoLingerin classio.vertx.proton.ProtonClientOptions- Parameters:
soLinger- true if SO_linger is enabled- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setIdleTimeout
Description copied from class:TCPSSLOptionsSet the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received nor sent within the timeout. If you want change default time unit, useTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)- Overrides:
setIdleTimeoutin classio.vertx.proton.ProtonClientOptions- Parameters:
idleTimeout- the timeout- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setIdleTimeoutUnit
Description copied from class:TCPSSLOptionsSet the idle timeout unit. If not specified, default is seconds.- Overrides:
setIdleTimeoutUnitin classio.vertx.proton.ProtonClientOptions- Parameters:
idleTimeoutUnit- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setSsl
Description copied from class:TCPSSLOptionsSet whether SSL/TLS is enabled- Overrides:
setSslin classio.vertx.proton.ProtonClientOptions- Parameters:
ssl- true if enabled- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setSslHandshakeTimeout
Description copied from class:TCPSSLOptionsSet the SSL handshake timeout, default time unit is seconds.- Overrides:
setSslHandshakeTimeoutin classio.vertx.proton.ProtonClientOptions- Parameters:
sslHandshakeTimeout- the SSL handshake timeout to set, in milliseconds- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setSslHandshakeTimeoutUnit
Description copied from class:TCPSSLOptionsSet the SSL handshake timeout unit. If not specified, default is seconds.- Overrides:
setSslHandshakeTimeoutUnitin classio.vertx.proton.ProtonClientOptions- Parameters:
sslHandshakeTimeoutUnit- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setKeyCertOptions
Description copied from class:TCPSSLOptionsSet the key/cert options.- Overrides:
setKeyCertOptionsin classio.vertx.proton.ProtonClientOptions- Parameters:
options- the key store options- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setTrustOptions
Description copied from class:TCPSSLOptionsSet the trust options.- Overrides:
setTrustOptionsin classio.vertx.proton.ProtonClientOptions- Parameters:
options- the trust options- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
addEnabledCipherSuite
Description copied from class:TCPSSLOptionsAdd an enabled cipher suite, appended to the ordered suites.- Overrides:
addEnabledCipherSuitein classio.vertx.proton.ProtonClientOptions- Parameters:
suite- the suite- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
addCrlPath
Description copied from class:TCPSSLOptionsAdd a CRL path- Overrides:
addCrlPathin classio.vertx.proton.ProtonClientOptions- Parameters:
crlPath- the path- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
addCrlValue
Description copied from class:TCPSSLOptionsAdd a CRL value- Overrides:
addCrlValuein classio.vertx.proton.ProtonClientOptions- Parameters:
crlValue- the value- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setTrustAll
Description copied from class:ClientOptionsBaseSet whether all server certificates should be trusted- Overrides:
setTrustAllin classio.vertx.proton.ProtonClientOptions- Parameters:
trustAll- true if all should be trusted- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setConnectTimeout
Description copied from class:ClientOptionsBaseSet the connect timeout- Overrides:
setConnectTimeoutin classio.vertx.proton.ProtonClientOptions- Parameters:
connectTimeout- connect timeout, in ms- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setReconnectAttempts
Description copied from class:NetClientOptionsSet the value of reconnect attempts- Overrides:
setReconnectAttemptsin classio.vertx.proton.ProtonClientOptions- Parameters:
attempts- the maximum number of reconnect attempts- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setReconnectInterval
Description copied from class:NetClientOptionsSet the reconnect interval- Overrides:
setReconnectIntervalin classio.vertx.proton.ProtonClientOptions- Parameters:
interval- the reconnect interval in ms- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
addEnabledSecureTransportProtocol
Description copied from class:TCPSSLOptionsAdd an enabled SSL/TLS protocols, appended to the ordered protocols.- Overrides:
addEnabledSecureTransportProtocolin classio.vertx.proton.ProtonClientOptions- Parameters:
protocol- the SSL/TLS protocol to enable- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setHostnameVerificationAlgorithm
Description copied from class:NetClientOptionsSet the hostname verification algorithm interval To disable hostname verification, set hostnameVerificationAlgorithm to an empty String- Overrides:
setHostnameVerificationAlgorithmin classio.vertx.proton.ProtonClientOptions- Parameters:
hostnameVerificationAlgorithm- should be HTTPS, LDAPS or an empty String- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setSslEngineOptions
Description copied from class:TCPSSLOptionsSet to use SSL engine implementation to use.- Overrides:
setSslEngineOptionsin classio.vertx.proton.ProtonClientOptions- Parameters:
sslEngineOptions- the ssl engine to use- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setLocalAddress
Description copied from class:ClientOptionsBaseSet the local interface to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.- Overrides:
setLocalAddressin classio.vertx.proton.ProtonClientOptions- Parameters:
localAddress- the local address- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setReusePort
Description copied from class:NetworkOptionsSet the value of reuse port. This is only supported by native transports.- Overrides:
setReusePortin classio.vertx.proton.ProtonClientOptions- Parameters:
reusePort- the value of reuse port- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setTcpCork
Description copied from class:TCPSSLOptionsEnable theTCP_CORKoption - only with linux native transport.- Overrides:
setTcpCorkin classio.vertx.proton.ProtonClientOptions- Parameters:
tcpCork- the cork value- See Also:
-
setTcpFastOpen
Description copied from class:TCPSSLOptionsEnable theTCP_FASTOPENoption - only with linux native transport.- Overrides:
setTcpFastOpenin classio.vertx.proton.ProtonClientOptions- Parameters:
tcpFastOpen- the fast open value- See Also:
-
setTcpQuickAck
Description copied from class:TCPSSLOptionsEnable theTCP_QUICKACKoption - only with linux native transport.- Overrides:
setTcpQuickAckin classio.vertx.proton.ProtonClientOptions- Parameters:
tcpQuickAck- the quick ack value- See Also:
-
removeEnabledSecureTransportProtocol
Description copied from class:TCPSSLOptionsRemoves an enabled SSL/TLS protocol from the ordered protocols.- Overrides:
removeEnabledSecureTransportProtocolin classio.vertx.proton.ProtonClientOptions- Parameters:
protocol- the SSL/TLS protocol to disable- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setEnabledSecureTransportProtocols
public AmqpClientOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) Description copied from class:TCPSSLOptionsSets the list of enabled SSL/TLS protocols.- Overrides:
setEnabledSecureTransportProtocolsin classio.vertx.proton.ProtonClientOptions- Parameters:
enabledSecureTransportProtocols- the SSL/TLS protocols to enable- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setVirtualHost
- Overrides:
setVirtualHostin classio.vertx.proton.ProtonClientOptions- See Also:
-
setSniServerName
- Overrides:
setSniServerNamein classio.vertx.proton.ProtonClientOptions- See Also:
-
setHeartbeat
- Overrides:
setHeartbeatin classio.vertx.proton.ProtonClientOptions- See Also:
-
setMaxFrameSize
- Overrides:
setMaxFrameSizein classio.vertx.proton.ProtonClientOptions- See Also:
-