Top Description Fields Constructors Methods
io.vertx.core.eventbus

public Class EventBusOptions

extends TCPSSLOptions
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
inheritConverter:true
Imports
io.vertx.codegen.annotations.DataObject, .GenIgnore, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.buffer.Buffer, io.vertx.core.http.ClientAuth, io.vertx.core.json.JsonObject, io.vertx.core.net.*, java.util.Set, java.util.concurrent.TimeUnit

Options to configure the event bus.
Author
Clement Escoffier

Field Summary

Modifier and TypeField and Description
private int
private ClientAuth
private JsonObject
clusterNodeMetadata

References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
private long
private long
private String
private int
private int
public static final int
DEFAULT_ACCEPT_BACKLOG

The default accept backlog = 1024

public static final ClientAuth
DEFAULT_CLIENT_AUTH

Default value of whether client auth is required (SSL/TLS) = No

public static final String
DEFAULT_CLUSTER_HOST

The default cluster host = null which means use the same as the cluster manager, if possible.

public static final long
DEFAULT_CLUSTER_PING_INTERVAL

The default value of cluster ping interval = 20000 ms.

public static final long
DEFAULT_CLUSTER_PING_REPLY_INTERVAL

The default value of cluster ping reply interval = 20000 ms.

public static final int
DEFAULT_CLUSTER_PORT

The default cluster port = 0 which means assign a random port.

public static final String
DEFAULT_CLUSTER_PUBLIC_HOST

The default cluster public host = null which means use the same as the cluster host.

public static final int
DEFAULT_CLUSTER_PUBLIC_PORT

The default cluster public port = -1 which means use the same as the cluster port.

public static final int
DEFAULT_CONNECT_TIMEOUT

The default value of connect timeout = 60000 ms

public static final int
DEFAULT_RECONNECT_ATTEMPTS

The default value for reconnect attempts = 0

public static final long
DEFAULT_RECONNECT_INTERVAL

The default value for reconnect interval = 1000 ms

public static final boolean
DEFAULT_TRUST_ALL

The default value of whether all servers (SSL/TLS) should be trusted = true

private String
private int
private int
private long
private boolean
Inherited from io.vertx.core.net.TCPSSLOptions:
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLSDEFAULT_IDLE_TIMEOUTDEFAULT_IDLE_TIMEOUT_TIME_UNITDEFAULT_READ_IDLE_TIMEOUTDEFAULT_SO_LINGERDEFAULT_SSLDEFAULT_SSL_ENGINEDEFAULT_SSL_HANDSHAKE_TIMEOUTDEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNITDEFAULT_TCP_CORKDEFAULT_TCP_FAST_OPENDEFAULT_TCP_KEEAPLIVE_INTERVAL_SECONDSDEFAULT_TCP_KEEP_ALIVEDEFAULT_TCP_KEEPALIVE_COUNTDEFAULT_TCP_KEEPALIVE_IDLE_SECONDSDEFAULT_TCP_NO_DELAYDEFAULT_TCP_QUICKACKDEFAULT_TCP_USER_TIMEOUTDEFAULT_USE_ALPNDEFAULT_WRITE_IDLE_TIMEOUT

Constructor Summary

AccessConstructor and Description
public
EventBusOptions()

Creates a new instance of EventBusOptions using the default configuration.

public
EventBusOptions(EventBusOptions
the other EventBusOptions
other
)

Copy constructor to create an instance of EventBusOptions using the values of the given object.

public
EventBusOptions(JsonObject
the json object
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Creates a new instance of EventBusOptions from the JSON object.

Method Summary

Modifier and TypeMethod and Description
public EventBusOptions
addCrlPath(String
the path
crlPath
)

Overrides io.vertx.core.net.TCPSSLOptions.addCrlPath.

Add a CRL path

public EventBusOptions
addCrlValue(Buffer
the value
crlValue
)

Overrides io.vertx.core.net.TCPSSLOptions.addCrlValue.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Add a CRL value

public EventBusOptions
addEnabledCipherSuite(String
the suite
suite
)

Overrides io.vertx.core.net.TCPSSLOptions.addEnabledCipherSuite.

Add an enabled cipher suite, appended to the ordered suites.

public EventBusOptions
addEnabledSecureTransportProtocol(String
the SSL/TLS protocol to enable
protocol
)

Overrides io.vertx.core.net.TCPSSLOptions.addEnabledSecureTransportProtocol.

Add an enabled SSL/TLS protocols, appended to the ordered protocols.

public int

Returns:

the value of accept backlog.
getAcceptBacklog
()

public ClientAuth

Returns:

the configure client authentication requirement
getClientAuth
()

public JsonObject

Returns:

user-supplied information about this node when Vert.x is clustered
getClusterNodeMetadata
()
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

User-supplied information about this node when Vert.x is clustered.

public long

Returns:

the value of cluster ping reply interval
getClusterPingInterval
()

Get the value of cluster ping reply interval, in ms.

public long

Returns:

the value of cluster ping reply interval
getClusterPingReplyInterval
()

Get the value of cluster ping reply interval, in ms.

public String

Returns:

the public facing port
getClusterPublicHost
()

Get the public facing host to be used when clustering.

public int

Returns:

the public facing port
getClusterPublicPort
()

Gets the public facing port to be used when clustering.

public int

Returns:

the value of connect timeout
getConnectTimeout
()

public String

Returns:

the host or null if the clustered eventbus should try to pick one automatically
getHost
()

public int

Returns:

the port, which can be configured from the setPort(int), or using the --cluster-port command line option.
getPort
()

public int

Returns:

the value of reconnect attempts
getReconnectAttempts
()

public long

Returns:

the value of reconnect interval
getReconnectInterval
()

public boolean

Returns:

true if all server certificates should be trusted
isTrustAll
()

public EventBusOptions
removeEnabledCipherSuite(String
the suite
suite
)

Overrides io.vertx.core.net.TCPSSLOptions.removeEnabledCipherSuite.

Removes an enabled cipher suite from the ordered suites.

public EventBusOptions
removeEnabledSecureTransportProtocol(String
the SSL/TLS protocol to disable
protocol
)

Overrides io.vertx.core.net.TCPSSLOptions.removeEnabledSecureTransportProtocol.

Removes an enabled SSL/TLS protocol from the ordered protocols.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setAcceptBacklog
(int
accept backlog
acceptBacklog
)

Set the accept back log.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setClientAuth
(ClientAuth
One of "NONE, REQUEST, REQUIRED". If it's set to "REQUIRED" then server will require the SSL cert to be presented otherwise it won't accept the request. If it's set to "REQUEST" then it won't mandate the certificate to be presented, basically make it optional.
clientAuth
)

Set whether client auth is required

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setClusterNodeMetadata
(JsonObject
user-supplied information about this node when Vert.x is clustered
clusterNodeMetadata
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Set information about this node when Vert.x is clustered.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setClusterPingInterval
(long
The value of cluster ping interval, in ms.
clusterPingInterval
)

Set the value of cluster ping interval, in ms.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setClusterPingReplyInterval
(long
The value of cluster ping reply interval, in ms.
clusterPingReplyInterval
)

Set the value of cluster ping reply interval, in ms.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setClusterPublicHost
(String
the public host name to use
clusterPublicHost
)

Set the public facing hostname to be used for clustering.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setClusterPublicPort
(int
the public port to use
clusterPublicPort
)

See setClusterPublicHost(String) for an explanation.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setConnectTimeout
(int
connect timeout, in ms
connectTimeout
)

Sets the connect timeout

public EventBusOptions
setEnabledSecureTransportProtocols(Set<String>
the SSL/TLS protocols to enable
enabledSecureTransportProtocols
)

Overrides io.vertx.core.net.TCPSSLOptions.setEnabledSecureTransportProtocols.

Sets the list of enabled SSL/TLS protocols.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setHost
(String
the host
host
)

Sets the host.

public EventBusOptions
setIdleTimeout(int
the timeout
idleTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setIdleTimeout.

Set the idle timeout, default time unit is seconds.

public EventBusOptions
setIdleTimeoutUnit(TimeUnit
specify time unit.
idleTimeoutUnit
)

Overrides io.vertx.core.net.TCPSSLOptions.setIdleTimeoutUnit.

Set the idle timeout unit.

public EventBusOptions
public EventBusOptions
setKeyCertOptions(KeyCertOptions
the key store options
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setKeyCertOptions.

Set the key/cert options.

public EventBusOptions
setKeyStoreOptions(JksOptions
the key store in jks format
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setKeyStoreOptions.

Deprecated

Set the key/cert options in jks format, aka Java keystore.

public EventBusOptions
setLogActivity(boolean
true for logging the network activity
logEnabled
)

Overrides io.vertx.core.net.TCPSSLOptions.setLogActivity.

Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.

public EventBusOptions
public EventBusOptions
setPemKeyCertOptions(PemKeyCertOptions
the options in pem format
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setPemKeyCertOptions.

Deprecated

Set the key/cert store options in pem format.

public EventBusOptions
setPemTrustOptions(PemTrustOptions
the trust options in pem format
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setPemTrustOptions.

Deprecated

Set the trust options in pem format

public EventBusOptions
setPfxKeyCertOptions(PfxOptions
the key cert options in pfx format
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setPfxKeyCertOptions.

Deprecated

Set the key/cert options in pfx format.

public EventBusOptions
setPfxTrustOptions(PfxOptions
the trust options in pfx format
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setPfxTrustOptions.

Deprecated

Set the trust options in pfx format

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setPort
(int
the port
port
)

Sets the port.

public EventBusOptions
setReadIdleTimeout(int
the read timeout
idleTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setReadIdleTimeout.

Set the read idle timeout, default time unit is seconds.

public EventBusOptions
setReceiveBufferSize(int
the buffers size, in bytes
receiveBufferSize
)

Overrides io.vertx.core.net.TCPSSLOptions.setReceiveBufferSize.

Set the TCP receive buffer size

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setReconnectAttempts
(int
the maximum number of reconnect attempts
attempts
)

Sets the value of reconnect attempts.

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setReconnectInterval
(long
the reconnect interval in ms
interval
)

Set the reconnect interval.

public EventBusOptions
setReuseAddress(boolean
the value of reuse address
reuseAddress
)

Overrides io.vertx.core.net.TCPSSLOptions.setReuseAddress.

Set the value of reuse address

public EventBusOptions
setReusePort(boolean
the value of reuse port
reusePort
)

Overrides io.vertx.core.net.TCPSSLOptions.setReusePort.

Set the value of reuse port.

public EventBusOptions
setSendBufferSize(int
the buffers size, in bytes
sendBufferSize
)

Overrides io.vertx.core.net.TCPSSLOptions.setSendBufferSize.

Set the TCP send buffer size

public EventBusOptions
setSoLinger(int
true if SO_linger is enabled
soLinger
)

Overrides io.vertx.core.net.TCPSSLOptions.setSoLinger.

Set whether SO_linger keep alive is enabled

public EventBusOptions
setSsl(boolean
true if enabled
ssl
)

Overrides io.vertx.core.net.TCPSSLOptions.setSsl.

Set whether SSL/TLS is enabled

public EventBusOptions
setSslEngineOptions(SSLEngineOptions
the ssl engine to use
sslEngineOptions
)

Overrides io.vertx.core.net.TCPSSLOptions.setSslEngineOptions.

Set to use SSL engine implementation to use.

public EventBusOptions
setSslHandshakeTimeout(long
the SSL handshake timeout to set, in milliseconds
sslHandshakeTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setSslHandshakeTimeout.

Set the SSL handshake timeout, default time unit is seconds.

public EventBusOptions
setSslHandshakeTimeoutUnit(TimeUnit
specify time unit.
sslHandshakeTimeoutUnit
)

Overrides io.vertx.core.net.TCPSSLOptions.setSslHandshakeTimeoutUnit.

Set the SSL handshake timeout unit.

public EventBusOptions
setTcpCork(boolean
the cork value
tcpCork
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpCork.

Enable the TCP_CORK option - only with linux native transport.

public EventBusOptions
setTcpFastOpen(boolean
the fast open value
tcpFastOpen
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpFastOpen.

Enable the TCP_FASTOPEN option - only with linux native transport.

public EventBusOptions
setTcpKeepAlive(boolean
true if TCP keep alive is enabled
tcpKeepAlive
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpKeepAlive.

Set whether TCP keep alive is enabled

public EventBusOptions
setTcpNoDelay(boolean
true if TCP no delay is enabled (Nagle disabled)
tcpNoDelay
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpNoDelay.

Set whether TCP no delay is enabled

public EventBusOptions
setTcpQuickAck(boolean
the quick ack value
tcpQuickAck
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpQuickAck.

Enable the TCP_QUICKACK option - only with linux native transport.

public EventBusOptions
setTcpUserTimeout(int
the tcp user timeout value
tcpUserTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpUserTimeout.

Sets the TCP_USER_TIMEOUT option - only with linux native transport.

public EventBusOptions
setTrafficClass(int
the value of traffic class
trafficClass
)

Overrides io.vertx.core.net.TCPSSLOptions.setTrafficClass.

Set the value of traffic class

public EventBusOptions

Returns:

a reference to this, so the API can be used fluently
setTrustAll
(boolean
true if all should be trusted
trustAll
)

Set whether all server certificates should be trusted.

public EventBusOptions
setTrustOptions(TrustOptions
the trust options
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setTrustOptions.

Set the trust options.

public EventBusOptions
setTrustStoreOptions(JksOptions
the trust options in jks format
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setTrustStoreOptions.

Deprecated

Set the trust options in jks format, aka Java truststore

public EventBusOptions
setUseAlpn(boolean
true when Application-Layer Protocol Negotiation should be used
useAlpn
)

Overrides io.vertx.core.net.TCPSSLOptions.setUseAlpn.

Set the ALPN usage.

public EventBusOptions
setWriteIdleTimeout(int
the write timeout
idleTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setWriteIdleTimeout.

Set the write idle timeout, default time unit is seconds.

public JsonObject

Returns:

the JSON representation
toJson
()

Overrides io.vertx.core.net.TCPSSLOptions.toJson.

References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Builds a JSON object representing the current EventBusOptions.

Inherited from io.vertx.core.net.TCPSSLOptions:
getCrlPathsgetCrlValuesgetEnabledCipherSuitesgetEnabledSecureTransportProtocolsgetIdleTimeoutgetIdleTimeoutUnitgetJdkSslEngineOptionsgetKeyCertOptionsgetKeyStoreOptionsgetOpenSslEngineOptionsgetPemKeyCertOptionsgetPemTrustOptionsgetPfxKeyCertOptionsgetPfxTrustOptionsgetReadIdleTimeoutgetSoLingergetSslEngineOptionsgetSslHandshakeTimeoutgetSslHandshakeTimeoutUnitgetSslOptionsgetTcpKeepAliveCountgetTcpKeepAliveIdleSecondsgetTcpKeepAliveIntervalSecondsgetTcpUserTimeoutgetTrustOptionsgetTrustStoreOptionsgetWriteIdleTimeoutisSslisTcpCorkisTcpFastOpenisTcpKeepAliveisTcpNoDelayisTcpQuickAckisUseAlpnsetActivityLogDataFormatsetTcpKeepAliveCountsetTcpKeepAliveIdleSecondssetTcpKeepAliveIntervalSeconds