io.vertx.kotlin.amqp.AmqpClientOptions.kt Maven / Gradle / Ivy
/*
* Copyright 2019 Red Hat, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* The Apache License v2.0 is available at
* http://www.opensource.org/licenses/apache2.0.php
*
* You may elect to redistribute this code under either of these licenses.
*/
package io.vertx.kotlin.amqp
import io.vertx.amqp.AmqpClientOptions
import io.vertx.core.net.JdkSSLEngineOptions
import io.vertx.core.net.JksOptions
import io.vertx.core.net.OpenSSLEngineOptions
import io.vertx.core.net.PemKeyCertOptions
import io.vertx.core.net.PemTrustOptions
import io.vertx.core.net.PfxOptions
import io.vertx.core.net.ProxyOptions
import java.util.concurrent.TimeUnit
/**
* A function providing a DSL for building [io.vertx.amqp.AmqpClientOptions] objects.
*
* Configures the AMQP Client.
* You can also configure the underlying Proton instance. Refer to for details.
*
* @param connectTimeout
* @param connectionHostname Explicitly override the hostname value used for the AMQP Open frame. The host connected to as per [io.vertx.amqp.AmqpClientOptions] will be used in the Open frame by default.
* @param containerId Sets the container id.
* @param crlPaths
* @param crlValues
* @param enabledCipherSuites
* @param enabledSaslMechanisms
* @param enabledSecureTransportProtocols
* @param heartbeat
* @param host Sets the host.
* @param hostnameVerificationAlgorithm
* @param idleTimeout
* @param idleTimeoutUnit Set the idle timeout unit. If not specified, default is seconds.
* @param jdkSslEngineOptions
* @param keyStoreOptions
* @param localAddress
* @param logActivity Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
* @param maxFrameSize
* @param metricsName Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.
* @param openSslEngineOptions
* @param password Sets the password.
* @param pemKeyCertOptions
* @param pemTrustOptions
* @param pfxKeyCertOptions
* @param pfxTrustOptions
* @param port Sets the port.
* @param proxyOptions Set proxy options for connections via CONNECT proxy (e.g. Squid) or a SOCKS proxy.
* @param receiveBufferSize
* @param reconnectAttempts
* @param reconnectInterval
* @param reuseAddress
* @param reusePort
* @param sendBufferSize
* @param sniServerName
* @param soLinger
* @param ssl
* @param sslHandshakeTimeout Set the SSL handshake timeout, default time unit is seconds.
* @param sslHandshakeTimeoutUnit Set the SSL handshake timeout unit. If not specified, default is seconds.
* @param tcpCork
* @param tcpFastOpen
* @param tcpKeepAlive
* @param tcpNoDelay
* @param tcpQuickAck
* @param tcpUserTimeout Sets the TCP_USER_TIMEOUT
option - only with linux native transport.
* @param trafficClass
* @param trustAll
* @param trustStoreOptions
* @param useAlpn Set the ALPN usage.
* @param usePooledBuffers
* @param username Sets the username.
* @param virtualHost
*
*
* NOTE: This function has been automatically generated from the [io.vertx.amqp.AmqpClientOptions original] using Vert.x codegen.
*/
fun amqpClientOptionsOf(
connectTimeout: Int? = null,
connectionHostname: String? = null,
containerId: String? = null,
crlPaths: Iterable? = null,
crlValues: Iterable? = null,
enabledCipherSuites: Iterable? = null,
enabledSaslMechanisms: Iterable? = null,
enabledSecureTransportProtocols: Iterable? = null,
heartbeat: Int? = null,
host: String? = null,
hostnameVerificationAlgorithm: String? = null,
idleTimeout: Int? = null,
idleTimeoutUnit: TimeUnit? = null,
jdkSslEngineOptions: io.vertx.core.net.JdkSSLEngineOptions? = null,
keyStoreOptions: io.vertx.core.net.JksOptions? = null,
localAddress: String? = null,
logActivity: Boolean? = null,
maxFrameSize: Int? = null,
metricsName: String? = null,
openSslEngineOptions: io.vertx.core.net.OpenSSLEngineOptions? = null,
password: String? = null,
pemKeyCertOptions: io.vertx.core.net.PemKeyCertOptions? = null,
pemTrustOptions: io.vertx.core.net.PemTrustOptions? = null,
pfxKeyCertOptions: io.vertx.core.net.PfxOptions? = null,
pfxTrustOptions: io.vertx.core.net.PfxOptions? = null,
port: Int? = null,
proxyOptions: io.vertx.core.net.ProxyOptions? = null,
receiveBufferSize: Int? = null,
reconnectAttempts: Int? = null,
reconnectInterval: Long? = null,
reuseAddress: Boolean? = null,
reusePort: Boolean? = null,
sendBufferSize: Int? = null,
sniServerName: String? = null,
soLinger: Int? = null,
ssl: Boolean? = null,
sslHandshakeTimeout: Long? = null,
sslHandshakeTimeoutUnit: TimeUnit? = null,
tcpCork: Boolean? = null,
tcpFastOpen: Boolean? = null,
tcpKeepAlive: Boolean? = null,
tcpNoDelay: Boolean? = null,
tcpQuickAck: Boolean? = null,
tcpUserTimeout: Int? = null,
trafficClass: Int? = null,
trustAll: Boolean? = null,
trustStoreOptions: io.vertx.core.net.JksOptions? = null,
useAlpn: Boolean? = null,
usePooledBuffers: Boolean? = null,
username: String? = null,
virtualHost: String? = null): AmqpClientOptions = io.vertx.amqp.AmqpClientOptions().apply {
if (connectTimeout != null) {
this.setConnectTimeout(connectTimeout)
}
if (connectionHostname != null) {
this.setConnectionHostname(connectionHostname)
}
if (containerId != null) {
this.setContainerId(containerId)
}
if (crlPaths != null) {
for (item in crlPaths) {
this.addCrlPath(item)
}
}
if (crlValues != null) {
for (item in crlValues) {
this.addCrlValue(item)
}
}
if (enabledCipherSuites != null) {
for (item in enabledCipherSuites) {
this.addEnabledCipherSuite(item)
}
}
if (enabledSaslMechanisms != null) {
for (item in enabledSaslMechanisms) {
this.addEnabledSaslMechanism(item)
}
}
if (enabledSecureTransportProtocols != null) {
this.setEnabledSecureTransportProtocols(enabledSecureTransportProtocols.toSet())
}
if (heartbeat != null) {
this.setHeartbeat(heartbeat)
}
if (host != null) {
this.setHost(host)
}
if (hostnameVerificationAlgorithm != null) {
this.setHostnameVerificationAlgorithm(hostnameVerificationAlgorithm)
}
if (idleTimeout != null) {
this.setIdleTimeout(idleTimeout)
}
if (idleTimeoutUnit != null) {
this.setIdleTimeoutUnit(idleTimeoutUnit)
}
if (jdkSslEngineOptions != null) {
this.setJdkSslEngineOptions(jdkSslEngineOptions)
}
if (keyStoreOptions != null) {
this.setKeyStoreOptions(keyStoreOptions)
}
if (localAddress != null) {
this.setLocalAddress(localAddress)
}
if (logActivity != null) {
this.setLogActivity(logActivity)
}
if (maxFrameSize != null) {
this.setMaxFrameSize(maxFrameSize)
}
if (metricsName != null) {
this.setMetricsName(metricsName)
}
if (openSslEngineOptions != null) {
this.setOpenSslEngineOptions(openSslEngineOptions)
}
if (password != null) {
this.setPassword(password)
}
if (pemKeyCertOptions != null) {
this.setPemKeyCertOptions(pemKeyCertOptions)
}
if (pemTrustOptions != null) {
this.setPemTrustOptions(pemTrustOptions)
}
if (pfxKeyCertOptions != null) {
this.setPfxKeyCertOptions(pfxKeyCertOptions)
}
if (pfxTrustOptions != null) {
this.setPfxTrustOptions(pfxTrustOptions)
}
if (port != null) {
this.setPort(port)
}
if (proxyOptions != null) {
this.setProxyOptions(proxyOptions)
}
if (receiveBufferSize != null) {
this.setReceiveBufferSize(receiveBufferSize)
}
if (reconnectAttempts != null) {
this.setReconnectAttempts(reconnectAttempts)
}
if (reconnectInterval != null) {
this.setReconnectInterval(reconnectInterval)
}
if (reuseAddress != null) {
this.setReuseAddress(reuseAddress)
}
if (reusePort != null) {
this.setReusePort(reusePort)
}
if (sendBufferSize != null) {
this.setSendBufferSize(sendBufferSize)
}
if (sniServerName != null) {
this.setSniServerName(sniServerName)
}
if (soLinger != null) {
this.setSoLinger(soLinger)
}
if (ssl != null) {
this.setSsl(ssl)
}
if (sslHandshakeTimeout != null) {
this.setSslHandshakeTimeout(sslHandshakeTimeout)
}
if (sslHandshakeTimeoutUnit != null) {
this.setSslHandshakeTimeoutUnit(sslHandshakeTimeoutUnit)
}
if (tcpCork != null) {
this.setTcpCork(tcpCork)
}
if (tcpFastOpen != null) {
this.setTcpFastOpen(tcpFastOpen)
}
if (tcpKeepAlive != null) {
this.setTcpKeepAlive(tcpKeepAlive)
}
if (tcpNoDelay != null) {
this.setTcpNoDelay(tcpNoDelay)
}
if (tcpQuickAck != null) {
this.setTcpQuickAck(tcpQuickAck)
}
if (tcpUserTimeout != null) {
this.setTcpUserTimeout(tcpUserTimeout)
}
if (trafficClass != null) {
this.setTrafficClass(trafficClass)
}
if (trustAll != null) {
this.setTrustAll(trustAll)
}
if (trustStoreOptions != null) {
this.setTrustStoreOptions(trustStoreOptions)
}
if (useAlpn != null) {
this.setUseAlpn(useAlpn)
}
if (usePooledBuffers != null) {
this.setUsePooledBuffers(usePooledBuffers)
}
if (username != null) {
this.setUsername(username)
}
if (virtualHost != null) {
this.setVirtualHost(virtualHost)
}
}
/**
* A function providing a DSL for building [io.vertx.amqp.AmqpClientOptions] objects.
*
* Configures the AMQP Client.
* You can also configure the underlying Proton instance. Refer to for details.
*
* @param connectTimeout
* @param connectionHostname Explicitly override the hostname value used for the AMQP Open frame. The host connected to as per [io.vertx.amqp.AmqpClientOptions] will be used in the Open frame by default.
* @param containerId Sets the container id.
* @param crlPaths
* @param crlValues
* @param enabledCipherSuites
* @param enabledSaslMechanisms
* @param enabledSecureTransportProtocols
* @param heartbeat
* @param host Sets the host.
* @param hostnameVerificationAlgorithm
* @param idleTimeout
* @param idleTimeoutUnit Set the idle timeout unit. If not specified, default is seconds.
* @param jdkSslEngineOptions
* @param keyStoreOptions
* @param localAddress
* @param logActivity Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
* @param maxFrameSize
* @param metricsName Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.
* @param openSslEngineOptions
* @param password Sets the password.
* @param pemKeyCertOptions
* @param pemTrustOptions
* @param pfxKeyCertOptions
* @param pfxTrustOptions
* @param port Sets the port.
* @param proxyOptions Set proxy options for connections via CONNECT proxy (e.g. Squid) or a SOCKS proxy.
* @param receiveBufferSize
* @param reconnectAttempts
* @param reconnectInterval
* @param reuseAddress
* @param reusePort
* @param sendBufferSize
* @param sniServerName
* @param soLinger
* @param ssl
* @param sslHandshakeTimeout Set the SSL handshake timeout, default time unit is seconds.
* @param sslHandshakeTimeoutUnit Set the SSL handshake timeout unit. If not specified, default is seconds.
* @param tcpCork
* @param tcpFastOpen
* @param tcpKeepAlive
* @param tcpNoDelay
* @param tcpQuickAck
* @param tcpUserTimeout Sets the TCP_USER_TIMEOUT
option - only with linux native transport.
* @param trafficClass
* @param trustAll
* @param trustStoreOptions
* @param useAlpn Set the ALPN usage.
* @param usePooledBuffers
* @param username Sets the username.
* @param virtualHost
*
*
* NOTE: This function has been automatically generated from the [io.vertx.amqp.AmqpClientOptions original] using Vert.x codegen.
*/
@Deprecated(
message = "This function will be removed in a future version",
replaceWith = ReplaceWith("amqpClientOptionsOf(connectTimeout, connectionHostname, containerId, crlPaths, crlValues, enabledCipherSuites, enabledSaslMechanisms, enabledSecureTransportProtocols, heartbeat, host, hostnameVerificationAlgorithm, idleTimeout, idleTimeoutUnit, jdkSslEngineOptions, keyStoreOptions, localAddress, logActivity, maxFrameSize, metricsName, openSslEngineOptions, password, pemKeyCertOptions, pemTrustOptions, pfxKeyCertOptions, pfxTrustOptions, port, proxyOptions, receiveBufferSize, reconnectAttempts, reconnectInterval, reuseAddress, reusePort, sendBufferSize, sniServerName, soLinger, ssl, sslHandshakeTimeout, sslHandshakeTimeoutUnit, tcpCork, tcpFastOpen, tcpKeepAlive, tcpNoDelay, tcpQuickAck, tcpUserTimeout, trafficClass, trustAll, trustStoreOptions, useAlpn, usePooledBuffers, username, virtualHost)")
)
fun AmqpClientOptions(
connectTimeout: Int? = null,
connectionHostname: String? = null,
containerId: String? = null,
crlPaths: Iterable? = null,
crlValues: Iterable? = null,
enabledCipherSuites: Iterable? = null,
enabledSaslMechanisms: Iterable? = null,
enabledSecureTransportProtocols: Iterable? = null,
heartbeat: Int? = null,
host: String? = null,
hostnameVerificationAlgorithm: String? = null,
idleTimeout: Int? = null,
idleTimeoutUnit: TimeUnit? = null,
jdkSslEngineOptions: io.vertx.core.net.JdkSSLEngineOptions? = null,
keyStoreOptions: io.vertx.core.net.JksOptions? = null,
localAddress: String? = null,
logActivity: Boolean? = null,
maxFrameSize: Int? = null,
metricsName: String? = null,
openSslEngineOptions: io.vertx.core.net.OpenSSLEngineOptions? = null,
password: String? = null,
pemKeyCertOptions: io.vertx.core.net.PemKeyCertOptions? = null,
pemTrustOptions: io.vertx.core.net.PemTrustOptions? = null,
pfxKeyCertOptions: io.vertx.core.net.PfxOptions? = null,
pfxTrustOptions: io.vertx.core.net.PfxOptions? = null,
port: Int? = null,
proxyOptions: io.vertx.core.net.ProxyOptions? = null,
receiveBufferSize: Int? = null,
reconnectAttempts: Int? = null,
reconnectInterval: Long? = null,
reuseAddress: Boolean? = null,
reusePort: Boolean? = null,
sendBufferSize: Int? = null,
sniServerName: String? = null,
soLinger: Int? = null,
ssl: Boolean? = null,
sslHandshakeTimeout: Long? = null,
sslHandshakeTimeoutUnit: TimeUnit? = null,
tcpCork: Boolean? = null,
tcpFastOpen: Boolean? = null,
tcpKeepAlive: Boolean? = null,
tcpNoDelay: Boolean? = null,
tcpQuickAck: Boolean? = null,
tcpUserTimeout: Int? = null,
trafficClass: Int? = null,
trustAll: Boolean? = null,
trustStoreOptions: io.vertx.core.net.JksOptions? = null,
useAlpn: Boolean? = null,
usePooledBuffers: Boolean? = null,
username: String? = null,
virtualHost: String? = null): AmqpClientOptions = io.vertx.amqp.AmqpClientOptions().apply {
if (connectTimeout != null) {
this.setConnectTimeout(connectTimeout)
}
if (connectionHostname != null) {
this.setConnectionHostname(connectionHostname)
}
if (containerId != null) {
this.setContainerId(containerId)
}
if (crlPaths != null) {
for (item in crlPaths) {
this.addCrlPath(item)
}
}
if (crlValues != null) {
for (item in crlValues) {
this.addCrlValue(item)
}
}
if (enabledCipherSuites != null) {
for (item in enabledCipherSuites) {
this.addEnabledCipherSuite(item)
}
}
if (enabledSaslMechanisms != null) {
for (item in enabledSaslMechanisms) {
this.addEnabledSaslMechanism(item)
}
}
if (enabledSecureTransportProtocols != null) {
this.setEnabledSecureTransportProtocols(enabledSecureTransportProtocols.toSet())
}
if (heartbeat != null) {
this.setHeartbeat(heartbeat)
}
if (host != null) {
this.setHost(host)
}
if (hostnameVerificationAlgorithm != null) {
this.setHostnameVerificationAlgorithm(hostnameVerificationAlgorithm)
}
if (idleTimeout != null) {
this.setIdleTimeout(idleTimeout)
}
if (idleTimeoutUnit != null) {
this.setIdleTimeoutUnit(idleTimeoutUnit)
}
if (jdkSslEngineOptions != null) {
this.setJdkSslEngineOptions(jdkSslEngineOptions)
}
if (keyStoreOptions != null) {
this.setKeyStoreOptions(keyStoreOptions)
}
if (localAddress != null) {
this.setLocalAddress(localAddress)
}
if (logActivity != null) {
this.setLogActivity(logActivity)
}
if (maxFrameSize != null) {
this.setMaxFrameSize(maxFrameSize)
}
if (metricsName != null) {
this.setMetricsName(metricsName)
}
if (openSslEngineOptions != null) {
this.setOpenSslEngineOptions(openSslEngineOptions)
}
if (password != null) {
this.setPassword(password)
}
if (pemKeyCertOptions != null) {
this.setPemKeyCertOptions(pemKeyCertOptions)
}
if (pemTrustOptions != null) {
this.setPemTrustOptions(pemTrustOptions)
}
if (pfxKeyCertOptions != null) {
this.setPfxKeyCertOptions(pfxKeyCertOptions)
}
if (pfxTrustOptions != null) {
this.setPfxTrustOptions(pfxTrustOptions)
}
if (port != null) {
this.setPort(port)
}
if (proxyOptions != null) {
this.setProxyOptions(proxyOptions)
}
if (receiveBufferSize != null) {
this.setReceiveBufferSize(receiveBufferSize)
}
if (reconnectAttempts != null) {
this.setReconnectAttempts(reconnectAttempts)
}
if (reconnectInterval != null) {
this.setReconnectInterval(reconnectInterval)
}
if (reuseAddress != null) {
this.setReuseAddress(reuseAddress)
}
if (reusePort != null) {
this.setReusePort(reusePort)
}
if (sendBufferSize != null) {
this.setSendBufferSize(sendBufferSize)
}
if (sniServerName != null) {
this.setSniServerName(sniServerName)
}
if (soLinger != null) {
this.setSoLinger(soLinger)
}
if (ssl != null) {
this.setSsl(ssl)
}
if (sslHandshakeTimeout != null) {
this.setSslHandshakeTimeout(sslHandshakeTimeout)
}
if (sslHandshakeTimeoutUnit != null) {
this.setSslHandshakeTimeoutUnit(sslHandshakeTimeoutUnit)
}
if (tcpCork != null) {
this.setTcpCork(tcpCork)
}
if (tcpFastOpen != null) {
this.setTcpFastOpen(tcpFastOpen)
}
if (tcpKeepAlive != null) {
this.setTcpKeepAlive(tcpKeepAlive)
}
if (tcpNoDelay != null) {
this.setTcpNoDelay(tcpNoDelay)
}
if (tcpQuickAck != null) {
this.setTcpQuickAck(tcpQuickAck)
}
if (tcpUserTimeout != null) {
this.setTcpUserTimeout(tcpUserTimeout)
}
if (trafficClass != null) {
this.setTrafficClass(trafficClass)
}
if (trustAll != null) {
this.setTrustAll(trustAll)
}
if (trustStoreOptions != null) {
this.setTrustStoreOptions(trustStoreOptions)
}
if (useAlpn != null) {
this.setUseAlpn(useAlpn)
}
if (usePooledBuffers != null) {
this.setUsePooledBuffers(usePooledBuffers)
}
if (username != null) {
this.setUsername(username)
}
if (virtualHost != null) {
this.setVirtualHost(virtualHost)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy