Package io.vertx.core.eventbus
Class EventBusOptions
- java.lang.Object
-
- io.vertx.core.net.NetworkOptions
-
- io.vertx.core.net.TCPSSLOptions
-
- io.vertx.core.eventbus.EventBusOptions
-
public class EventBusOptions extends TCPSSLOptions
Options to configure the event bus.- Author:
- Clement Escoffier
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ACCEPT_BACKLOG
The default accept backlog = 1024static ClientAuth
DEFAULT_CLIENT_AUTH
Default value of whether client auth is required (SSL/TLS) = Nostatic String
DEFAULT_CLUSTER_HOST
The default cluster host = null which means use the same as the cluster manager, if possible.static long
DEFAULT_CLUSTER_PING_INTERVAL
The default value of cluster ping interval = 20000 ms.static long
DEFAULT_CLUSTER_PING_REPLY_INTERVAL
The default value of cluster ping reply interval = 20000 ms.static int
DEFAULT_CLUSTER_PORT
The default cluster port = 0 which means assign a random port.static String
DEFAULT_CLUSTER_PUBLIC_HOST
The default cluster public host = null which means use the same as the cluster host.static int
DEFAULT_CLUSTER_PUBLIC_PORT
The default cluster public port = -1 which means use the same as the cluster port.static int
DEFAULT_CONNECT_TIMEOUT
The default value of connect timeout = 60000 msstatic int
DEFAULT_RECONNECT_ATTEMPTS
The default value for reconnect attempts = 0static long
DEFAULT_RECONNECT_INTERVAL
The default value for reconnect interval = 1000 msstatic boolean
DEFAULT_TRUST_ALL
The default value of whether all servers (SSL/TLS) should be trusted = true-
Fields inherited from class io.vertx.core.net.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_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_WRITE_IDLE_TIMEOUT
-
Fields inherited from class io.vertx.core.net.NetworkOptions
DEFAULT_LOG_ACTIVITY_FORMAT, DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
-
-
Constructor Summary
Constructors Constructor Description EventBusOptions()
Creates a new instance ofEventBusOptions
using the default configuration.EventBusOptions(EventBusOptions other)
Copy constructor to create an instance ofEventBusOptions
using the values of the given object.EventBusOptions(JsonObject json)
Creates a new instance ofEventBusOptions
from the JSON object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventBusOptions
addCrlPath(String crlPath)
Add a CRL pathEventBusOptions
addCrlValue(Buffer crlValue)
Add a CRL valueEventBusOptions
addEnabledCipherSuite(String suite)
Add an enabled cipher suite, appended to the ordered suites.EventBusOptions
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.int
getAcceptBacklog()
ClientAuth
getClientAuth()
JsonObject
getClusterNodeMetadata()
User-supplied information about this node when Vert.x is clustered.long
getClusterPingInterval()
Get the value of cluster ping reply interval, in ms.long
getClusterPingReplyInterval()
Get the value of cluster ping reply interval, in ms.String
getClusterPublicHost()
Get the public facing host to be used when clustering.int
getClusterPublicPort()
Gets the public facing port to be used when clustering.int
getConnectTimeout()
String
getHost()
int
getPort()
int
getReconnectAttempts()
long
getReconnectInterval()
boolean
isTrustAll()
EventBusOptions
removeEnabledCipherSuite(String suite)
Removes an enabled cipher suite from the ordered suites.EventBusOptions
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.EventBusOptions
setAcceptBacklog(int acceptBacklog)
Set the accept back log.EventBusOptions
setClientAuth(ClientAuth clientAuth)
Set whether client auth is requiredEventBusOptions
setClusterNodeMetadata(JsonObject clusterNodeMetadata)
Set information about this node when Vert.x is clustered.EventBusOptions
setClusterPingInterval(long clusterPingInterval)
Set the value of cluster ping interval, in ms.EventBusOptions
setClusterPingReplyInterval(long clusterPingReplyInterval)
Set the value of cluster ping reply interval, in ms.EventBusOptions
setClusterPublicHost(String clusterPublicHost)
Set the public facing hostname to be used for clustering.EventBusOptions
setClusterPublicPort(int clusterPublicPort)
SeesetClusterPublicHost(String)
for an explanation.EventBusOptions
setConnectTimeout(int connectTimeout)
Sets the connect timeoutEventBusOptions
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.EventBusOptions
setHost(String host)
Sets the host.EventBusOptions
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.EventBusOptions
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.EventBusOptions
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.EventBusOptions
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.EventBusOptions
setPort(int port)
Sets the port.EventBusOptions
setReadIdleTimeout(int idleTimeout)
Set the read idle timeout, default time unit is seconds.EventBusOptions
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer sizeEventBusOptions
setReconnectAttempts(int attempts)
Sets the value of reconnect attempts.EventBusOptions
setReconnectInterval(long interval)
Set the reconnect interval.EventBusOptions
setReuseAddress(boolean reuseAddress)
Set the value of reuse addressEventBusOptions
setReusePort(boolean reusePort)
Set the value of reuse port.EventBusOptions
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer sizeEventBusOptions
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabledEventBusOptions
setSsl(boolean ssl)
Set whether SSL/TLS is enabledEventBusOptions
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.EventBusOptions
setSslHandshakeTimeout(long sslHandshakeTimeout)
Set the SSL handshake timeout, default time unit is seconds.EventBusOptions
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Set the SSL handshake timeout unit.EventBusOptions
setTcpCork(boolean tcpCork)
Enable theTCP_CORK
option - only with linux native transport.EventBusOptions
setTcpFastOpen(boolean tcpFastOpen)
Enable theTCP_FASTOPEN
option - only with linux native transport.EventBusOptions
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabledEventBusOptions
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabledEventBusOptions
setTcpQuickAck(boolean tcpQuickAck)
Enable theTCP_QUICKACK
option - only with linux native transport.EventBusOptions
setTcpUserTimeout(int tcpUserTimeout)
Sets theTCP_USER_TIMEOUT
option - only with linux native transport.EventBusOptions
setTrafficClass(int trafficClass)
Set the value of traffic classEventBusOptions
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted.EventBusOptions
setTrustOptions(TrustOptions options)
Set the trust options.EventBusOptions
setUseAlpn(boolean useAlpn)
Set the ALPN usage.EventBusOptions
setWriteIdleTimeout(int idleTimeout)
Set the write idle timeout, default time unit is seconds.JsonObject
toJson()
Builds a JSON object representing the currentEventBusOptions
.-
Methods inherited from class io.vertx.core.net.TCPSSLOptions
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getKeyCertOptions, getOrCreateSSLOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpUserTimeout, getTrustOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setActivityLogDataFormat
-
Methods inherited from class io.vertx.core.net.NetworkOptions
getActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
-
-
-
-
Field Detail
-
DEFAULT_CLUSTER_HOST
public static final String DEFAULT_CLUSTER_HOST
The default cluster host = null which means use the same as the cluster manager, if possible.
-
DEFAULT_CLUSTER_PORT
public static final int DEFAULT_CLUSTER_PORT
The default cluster port = 0 which means assign a random port.- See Also:
- Constant Field Values
-
DEFAULT_CLUSTER_PUBLIC_HOST
public static final String DEFAULT_CLUSTER_PUBLIC_HOST
The default cluster public host = null which means use the same as the cluster host.
-
DEFAULT_CLUSTER_PUBLIC_PORT
public static final int DEFAULT_CLUSTER_PUBLIC_PORT
The default cluster public port = -1 which means use the same as the cluster port.- See Also:
- Constant Field Values
-
DEFAULT_CLUSTER_PING_INTERVAL
public static final long DEFAULT_CLUSTER_PING_INTERVAL
The default value of cluster ping interval = 20000 ms.
-
DEFAULT_CLUSTER_PING_REPLY_INTERVAL
public static final long DEFAULT_CLUSTER_PING_REPLY_INTERVAL
The default value of cluster ping reply interval = 20000 ms.
-
DEFAULT_ACCEPT_BACKLOG
public static final int DEFAULT_ACCEPT_BACKLOG
The default accept backlog = 1024- See Also:
- Constant Field Values
-
DEFAULT_CLIENT_AUTH
public static final ClientAuth DEFAULT_CLIENT_AUTH
Default value of whether client auth is required (SSL/TLS) = No
-
DEFAULT_RECONNECT_ATTEMPTS
public static final int DEFAULT_RECONNECT_ATTEMPTS
The default value for reconnect attempts = 0- See Also:
- Constant Field Values
-
DEFAULT_RECONNECT_INTERVAL
public static final long DEFAULT_RECONNECT_INTERVAL
The default value for reconnect interval = 1000 ms- See Also:
- Constant Field Values
-
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
The default value of connect timeout = 60000 ms- See Also:
- Constant Field Values
-
DEFAULT_TRUST_ALL
public static final boolean DEFAULT_TRUST_ALL
The default value of whether all servers (SSL/TLS) should be trusted = true- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EventBusOptions
public EventBusOptions()
Creates a new instance ofEventBusOptions
using the default configuration.
-
EventBusOptions
public EventBusOptions(EventBusOptions other)
Copy constructor to create an instance ofEventBusOptions
using the values of the given object.- Parameters:
other
- the otherEventBusOptions
-
EventBusOptions
public EventBusOptions(JsonObject json)
Creates a new instance ofEventBusOptions
from the JSON object. This JSOn object has (generally) be generated usingtoJson()
.- Parameters:
json
- the json object
-
-
Method Detail
-
toJson
public JsonObject toJson()
Builds a JSON object representing the currentEventBusOptions
.- Overrides:
toJson
in classTCPSSLOptions
- Returns:
- the JSON representation
-
getClientAuth
public ClientAuth getClientAuth()
- Returns:
- the configure client authentication requirement
- See Also:
NetServerOptions.getClientAuth()
-
setClientAuth
public EventBusOptions setClientAuth(ClientAuth clientAuth)
Set whether client auth is required- Parameters:
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.- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetServerOptions.setClientAuth(ClientAuth)
-
getAcceptBacklog
public int getAcceptBacklog()
- Returns:
- the value of accept backlog.
- See Also:
NetServerOptions.getAcceptBacklog()
-
setAcceptBacklog
public EventBusOptions setAcceptBacklog(int acceptBacklog)
Set the accept back log.- Parameters:
acceptBacklog
- accept backlog- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetServerOptions.setAcceptBacklog(int)
-
getHost
public String getHost()
- Returns:
- the host or
null
if the clustered eventbus should try to pick one automatically
-
setHost
public EventBusOptions setHost(String host)
Sets the host. Defaults tonull
.When the clustered eventbus starts, it tries to bind to the provided
host
. Ifhost
isnull
, then it tries to bind to the same host as the underlying cluster manager. As a last resort, an address will be picked among the available network interfaces.- Parameters:
host
- the host- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetServerOptions.setHost(String)
-
getPort
public int getPort()
- Returns:
- the port, which can be configured from the
setPort(int)
, or using the--cluster-port
command line option. - See Also:
NetServerOptions.getPort()
-
setPort
public EventBusOptions setPort(int port)
Sets the port.- Parameters:
port
- the port- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetServerOptions.setPort(int)
-
getReconnectAttempts
public int getReconnectAttempts()
- Returns:
- the value of reconnect attempts
- See Also:
NetClientOptions.getReconnectAttempts()
-
setReconnectAttempts
public EventBusOptions setReconnectAttempts(int attempts)
Sets the value of reconnect attempts.- Parameters:
attempts
- the maximum number of reconnect attempts- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetClientOptions.setReconnectAttempts(int)
-
getReconnectInterval
public long getReconnectInterval()
- Returns:
- the value of reconnect interval
- See Also:
NetClientOptions.getReconnectInterval()
-
setReconnectInterval
public EventBusOptions setReconnectInterval(long interval)
Set the reconnect interval.- Parameters:
interval
- the reconnect interval in ms- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetClientOptions.setReconnectInterval(long)
-
addCrlPath
public EventBusOptions addCrlPath(String crlPath) throws NullPointerException
Description copied from class:TCPSSLOptions
Add a CRL path- Overrides:
addCrlPath
in classTCPSSLOptions
- Parameters:
crlPath
- the path- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
addCrlValue
public EventBusOptions addCrlValue(Buffer crlValue) throws NullPointerException
Description copied from class:TCPSSLOptions
Add a CRL value- Overrides:
addCrlValue
in classTCPSSLOptions
- Parameters:
crlValue
- the value- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
addEnabledCipherSuite
public EventBusOptions addEnabledCipherSuite(String suite)
Description copied from class:TCPSSLOptions
Add an enabled cipher suite, appended to the ordered suites.- Overrides:
addEnabledCipherSuite
in classTCPSSLOptions
- Parameters:
suite
- the suite- Returns:
- a reference to this, so the API can be used fluently
- See Also:
TCPSSLOptions.getEnabledCipherSuites()
-
removeEnabledCipherSuite
public EventBusOptions removeEnabledCipherSuite(String suite)
Description copied from class:TCPSSLOptions
Removes an enabled cipher suite from the ordered suites.- Overrides:
removeEnabledCipherSuite
in classTCPSSLOptions
- Parameters:
suite
- the suite- Returns:
- a reference to this, so the API can be used fluently
-
setIdleTimeout
public EventBusOptions setIdleTimeout(int idleTimeout)
Description copied from class:TCPSSLOptions
Set 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:
setIdleTimeout
in classTCPSSLOptions
- Parameters:
idleTimeout
- the timeout- Returns:
- a reference to this, so the API can be used fluently
-
setReadIdleTimeout
public EventBusOptions setReadIdleTimeout(int idleTimeout)
Description copied from class:TCPSSLOptions
Set the read 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 within the timeout. If you want change default time unit, useTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)
- Overrides:
setReadIdleTimeout
in classTCPSSLOptions
- Parameters:
idleTimeout
- the read timeout- Returns:
- a reference to this, so the API can be used fluently
-
setWriteIdleTimeout
public EventBusOptions setWriteIdleTimeout(int idleTimeout)
Description copied from class:TCPSSLOptions
Set the write 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 sent within the timeout. If you want change default time unit, useTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)
- Overrides:
setWriteIdleTimeout
in classTCPSSLOptions
- Parameters:
idleTimeout
- the write timeout- Returns:
- a reference to this, so the API can be used fluently
-
setIdleTimeoutUnit
public EventBusOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Description copied from class:TCPSSLOptions
Set the idle timeout unit. If not specified, default is seconds.- Overrides:
setIdleTimeoutUnit
in classTCPSSLOptions
- Parameters:
idleTimeoutUnit
- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
-
setKeyCertOptions
public EventBusOptions setKeyCertOptions(KeyCertOptions options)
Description copied from class:TCPSSLOptions
Set the key/cert options.- Overrides:
setKeyCertOptions
in classTCPSSLOptions
- Parameters:
options
- the key store options- Returns:
- a reference to this, so the API can be used fluently
-
setSoLinger
public EventBusOptions setSoLinger(int soLinger)
Description copied from class:TCPSSLOptions
Set whether SO_linger keep alive is enabled- Overrides:
setSoLinger
in classTCPSSLOptions
- Parameters:
soLinger
- true if SO_linger is enabled- Returns:
- a reference to this, so the API can be used fluently
-
setSsl
public EventBusOptions setSsl(boolean ssl)
Description copied from class:TCPSSLOptions
Set whether SSL/TLS is enabled- Overrides:
setSsl
in classTCPSSLOptions
- Parameters:
ssl
- true if enabled- Returns:
- a reference to this, so the API can be used fluently
-
setTcpKeepAlive
public EventBusOptions setTcpKeepAlive(boolean tcpKeepAlive)
Description copied from class:TCPSSLOptions
Set whether TCP keep alive is enabled- Overrides:
setTcpKeepAlive
in classTCPSSLOptions
- Parameters:
tcpKeepAlive
- true if TCP keep alive is enabled- Returns:
- a reference to this, so the API can be used fluently
-
setTcpNoDelay
public EventBusOptions setTcpNoDelay(boolean tcpNoDelay)
Description copied from class:TCPSSLOptions
Set whether TCP no delay is enabled- Overrides:
setTcpNoDelay
in classTCPSSLOptions
- Parameters:
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)- Returns:
- a reference to this, so the API can be used fluently
-
setTrustOptions
public EventBusOptions setTrustOptions(TrustOptions options)
Description copied from class:TCPSSLOptions
Set the trust options.- Overrides:
setTrustOptions
in classTCPSSLOptions
- Parameters:
options
- the trust options- Returns:
- a reference to this, so the API can be used fluently
-
setReceiveBufferSize
public EventBusOptions setReceiveBufferSize(int receiveBufferSize)
Description copied from class:NetworkOptions
Set the TCP receive buffer size- Overrides:
setReceiveBufferSize
in classTCPSSLOptions
- Parameters:
receiveBufferSize
- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
setReuseAddress
public EventBusOptions setReuseAddress(boolean reuseAddress)
Description copied from class:NetworkOptions
Set the value of reuse address- Overrides:
setReuseAddress
in classTCPSSLOptions
- Parameters:
reuseAddress
- the value of reuse address- Returns:
- a reference to this, so the API can be used fluently
-
setReusePort
public EventBusOptions setReusePort(boolean reusePort)
Description copied from class:NetworkOptions
Set the value of reuse port. This is only supported by native transports.- Overrides:
setReusePort
in classTCPSSLOptions
- Parameters:
reusePort
- the value of reuse port- Returns:
- a reference to this, so the API can be used fluently
-
setSendBufferSize
public EventBusOptions setSendBufferSize(int sendBufferSize)
Description copied from class:NetworkOptions
Set the TCP send buffer size- Overrides:
setSendBufferSize
in classTCPSSLOptions
- Parameters:
sendBufferSize
- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
setTrafficClass
public EventBusOptions setTrafficClass(int trafficClass)
Description copied from class:NetworkOptions
Set the value of traffic class- Overrides:
setTrafficClass
in classTCPSSLOptions
- Parameters:
trafficClass
- the value of traffic class- Returns:
- a reference to this, so the API can be used fluently
-
setUseAlpn
public EventBusOptions setUseAlpn(boolean useAlpn)
Description copied from class:TCPSSLOptions
Set the ALPN usage.- Overrides:
setUseAlpn
in classTCPSSLOptions
- Parameters:
useAlpn
- true when Application-Layer Protocol Negotiation should be used
-
setSslEngineOptions
public EventBusOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Description copied from class:TCPSSLOptions
Set to use SSL engine implementation to use.- Overrides:
setSslEngineOptions
in classTCPSSLOptions
- Parameters:
sslEngineOptions
- the ssl engine to use- Returns:
- a reference to this, so the API can be used fluently
-
setEnabledSecureTransportProtocols
public EventBusOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Description copied from class:TCPSSLOptions
Sets the list of enabled SSL/TLS protocols.- Overrides:
setEnabledSecureTransportProtocols
in classTCPSSLOptions
- Parameters:
enabledSecureTransportProtocols
- the SSL/TLS protocols to enable- Returns:
- a reference to this, so the API can be used fluently
-
addEnabledSecureTransportProtocol
public EventBusOptions addEnabledSecureTransportProtocol(String protocol)
Description copied from class:TCPSSLOptions
Add an enabled SSL/TLS protocols, appended to the ordered protocols.- Overrides:
addEnabledSecureTransportProtocol
in classTCPSSLOptions
- Parameters:
protocol
- the SSL/TLS protocol to enable- Returns:
- a reference to this, so the API can be used fluently
-
removeEnabledSecureTransportProtocol
public EventBusOptions removeEnabledSecureTransportProtocol(String protocol)
Description copied from class:TCPSSLOptions
Removes an enabled SSL/TLS protocol from the ordered protocols.- Overrides:
removeEnabledSecureTransportProtocol
in classTCPSSLOptions
- Parameters:
protocol
- the SSL/TLS protocol to disable- Returns:
- a reference to this, so the API can be used fluently
-
setTcpFastOpen
public EventBusOptions setTcpFastOpen(boolean tcpFastOpen)
Description copied from class:TCPSSLOptions
Enable theTCP_FASTOPEN
option - only with linux native transport.- Overrides:
setTcpFastOpen
in classTCPSSLOptions
- Parameters:
tcpFastOpen
- the fast open value
-
setTcpCork
public EventBusOptions setTcpCork(boolean tcpCork)
Description copied from class:TCPSSLOptions
Enable theTCP_CORK
option - only with linux native transport.- Overrides:
setTcpCork
in classTCPSSLOptions
- Parameters:
tcpCork
- the cork value
-
setTcpQuickAck
public EventBusOptions setTcpQuickAck(boolean tcpQuickAck)
Description copied from class:TCPSSLOptions
Enable theTCP_QUICKACK
option - only with linux native transport.- Overrides:
setTcpQuickAck
in classTCPSSLOptions
- Parameters:
tcpQuickAck
- the quick ack value
-
setTcpUserTimeout
public EventBusOptions setTcpUserTimeout(int tcpUserTimeout)
Description copied from class:TCPSSLOptions
Sets theTCP_USER_TIMEOUT
option - only with linux native transport.- Overrides:
setTcpUserTimeout
in classTCPSSLOptions
- Parameters:
tcpUserTimeout
- the tcp user timeout value
-
setLogActivity
public EventBusOptions setLogActivity(boolean logEnabled)
Description copied from class:NetworkOptions
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.- Overrides:
setLogActivity
in classTCPSSLOptions
- Parameters:
logEnabled
- true for logging the network activity- Returns:
- a reference to this, so the API can be used fluently
-
setSslHandshakeTimeout
public EventBusOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
Description copied from class:TCPSSLOptions
Set the SSL handshake timeout, default time unit is seconds.- Overrides:
setSslHandshakeTimeout
in classTCPSSLOptions
- Parameters:
sslHandshakeTimeout
- the SSL handshake timeout to set, in milliseconds- Returns:
- a reference to this, so the API can be used fluently
-
setSslHandshakeTimeoutUnit
public EventBusOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Description copied from class:TCPSSLOptions
Set the SSL handshake timeout unit. If not specified, default is seconds.- Overrides:
setSslHandshakeTimeoutUnit
in classTCPSSLOptions
- Parameters:
sslHandshakeTimeoutUnit
- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
-
setTrustAll
public EventBusOptions setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted.- Parameters:
trustAll
- true if all should be trusted- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetClientOptions.setTrustAll(boolean)
-
isTrustAll
public boolean isTrustAll()
- Returns:
- true if all server certificates should be trusted
- See Also:
ClientOptionsBase.isTrustAll()
-
getConnectTimeout
public int getConnectTimeout()
- Returns:
- the value of connect timeout
- See Also:
ClientOptionsBase.getConnectTimeout()
-
setConnectTimeout
public EventBusOptions setConnectTimeout(int connectTimeout)
Sets the connect timeout- Parameters:
connectTimeout
- connect timeout, in ms- Returns:
- a reference to this, so the API can be used fluently
- See Also:
NetClientOptions.setConnectTimeout(int)
-
getClusterPingInterval
public long getClusterPingInterval()
Get the value of cluster ping reply interval, in ms. After sending a ping, if a pong is not received in this time, the node will be considered dead.- Returns:
- the value of cluster ping reply interval
-
setClusterPingInterval
public EventBusOptions setClusterPingInterval(long clusterPingInterval)
Set the value of cluster ping interval, in ms.- Parameters:
clusterPingInterval
- The value of cluster ping interval, in ms.- Returns:
- a reference to this, so the API can be used fluently
-
getClusterPingReplyInterval
public long getClusterPingReplyInterval()
Get the value of cluster ping reply interval, in ms. After sending a ping, if a pong is not received in this time, the node will be considered dead.- Returns:
- the value of cluster ping reply interval
-
setClusterPingReplyInterval
public EventBusOptions setClusterPingReplyInterval(long clusterPingReplyInterval)
Set the value of cluster ping reply interval, in ms.- Parameters:
clusterPingReplyInterval
- The value of cluster ping reply interval, in ms.- Returns:
- a reference to this, so the API can be used fluently
-
getClusterPublicHost
public String getClusterPublicHost()
Get the public facing host to be used when clustering.- Returns:
- the public facing port
-
setClusterPublicHost
public EventBusOptions setClusterPublicHost(String clusterPublicHost)
Set the public facing hostname to be used for clustering. Sometimes, e.g. when running on certain clouds, the local address the server listens on for clustering is not the same address that other nodes connect to it at, as the OS / cloud infrastructure does some kind of proxying. If this is the case you can specify a public hostname which is different from the hostname the server listens at.The default value is null which means use the same as the cluster hostname.
- Parameters:
clusterPublicHost
- the public host name to use- Returns:
- a reference to this, so the API can be used fluently
-
getClusterPublicPort
public int getClusterPublicPort()
Gets the public facing port to be used when clustering.- Returns:
- the public facing port
-
setClusterPublicPort
public EventBusOptions setClusterPublicPort(int clusterPublicPort)
SeesetClusterPublicHost(String)
for an explanation.- Parameters:
clusterPublicPort
- the public port to use- Returns:
- a reference to this, so the API can be used fluently
-
getClusterNodeMetadata
public JsonObject getClusterNodeMetadata()
User-supplied information about this node when Vert.x is clustered.The data may be to select a node for a given message. For example, it could be used to implement a partioning strategy.
Not used by default.
- Returns:
- user-supplied information about this node when Vert.x is clustered
-
setClusterNodeMetadata
public EventBusOptions setClusterNodeMetadata(JsonObject clusterNodeMetadata)
Set information about this node when Vert.x is clustered.The data may be used to select a node for a given message. For example, it could be used to implement a partioning strategy.
Not used by default.
- Parameters:
clusterNodeMetadata
- user-supplied information about this node when Vert.x is clustered- Returns:
- a reference to this, so the API can be used fluently
-
-