public class EventBusOptions extends TCPSSLOptions
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ACCEPT_BACKLOG
The default accept backlog = 1024
|
static ClientAuth |
DEFAULT_CLIENT_AUTH
Default value of whether client auth is required (SSL/TLS) = No
|
static 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 ms
|
static int |
DEFAULT_RECONNECT_ATTEMPTS
The default value for reconnect attempts = 0
|
static long |
DEFAULT_RECONNECT_INTERVAL
The default value for reconnect interval = 1000 ms
|
static boolean |
DEFAULT_TRUST_ALL
The default value of whether all servers (SSL/TLS) should be trusted = true
|
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, 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_WRITE_IDLE_TIMEOUTDEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
EventBusOptions()
Creates a new instance of
EventBusOptions using the default configuration. |
EventBusOptions(EventBusOptions other)
Copy constructor to create an instance of
EventBusOptions using the values of the given object. |
EventBusOptions(JsonObject json)
Creates a new instance of
EventBusOptions from the JSON object. |
| Modifier and Type | Method and Description |
|---|---|
EventBusOptions |
addCrlPath(String crlPath)
Add a CRL path
|
EventBusOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
EventBusOptions |
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 |
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 required
|
EventBusOptions |
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)
See
setClusterPublicHost(String) for an explanation. |
EventBusOptions |
setConnectTimeout(int connectTimeout)
Sets the connect timeout
|
EventBusOptions |
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 |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
EventBusOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
EventBusOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
EventBusOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
EventBusOptions |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
EventBusOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
EventBusOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
EventBusOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
EventBusOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
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 size
|
EventBusOptions |
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 address
|
EventBusOptions |
setReusePort(boolean reusePort)
Set the value of reuse port.
|
EventBusOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
EventBusOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
EventBusOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
EventBusOptions |
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 the
TCP_CORK option - only with linux native transport. |
EventBusOptions |
setTcpFastOpen(boolean tcpFastOpen)
Enable the
TCP_FASTOPEN option - only with linux native transport. |
EventBusOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
EventBusOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
EventBusOptions |
setTcpQuickAck(boolean tcpQuickAck)
Enable the
TCP_QUICKACK option - only with linux native transport. |
EventBusOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
EventBusOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted.
|
EventBusOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
EventBusOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
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 current
EventBusOptions. |
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpngetLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic static final String DEFAULT_CLUSTER_HOST
public static final int DEFAULT_CLUSTER_PORT
public static final String DEFAULT_CLUSTER_PUBLIC_HOST
public static final int DEFAULT_CLUSTER_PUBLIC_PORT
public static final long DEFAULT_CLUSTER_PING_INTERVAL
public static final long DEFAULT_CLUSTER_PING_REPLY_INTERVAL
public static final int DEFAULT_ACCEPT_BACKLOG
public static final ClientAuth DEFAULT_CLIENT_AUTH
public static final int DEFAULT_RECONNECT_ATTEMPTS
public static final long DEFAULT_RECONNECT_INTERVAL
public static final int DEFAULT_CONNECT_TIMEOUT
public static final boolean DEFAULT_TRUST_ALL
public EventBusOptions()
EventBusOptions using the default configuration.public EventBusOptions(EventBusOptions other)
EventBusOptions using the values of the given object.other - the other EventBusOptionspublic EventBusOptions(JsonObject json)
EventBusOptions from the JSON object. This JSOn object has (generally)
be generated using toJson().json - the json objectpublic JsonObject toJson()
EventBusOptions.toJson in class TCPSSLOptionspublic ClientAuth getClientAuth()
NetServerOptions.getClientAuth()public EventBusOptions setClientAuth(ClientAuth clientAuth)
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.NetServerOptions.setClientAuth(ClientAuth)public int getAcceptBacklog()
NetServerOptions.getAcceptBacklog()public EventBusOptions setAcceptBacklog(int acceptBacklog)
acceptBacklog - accept backlogNetServerOptions.setAcceptBacklog(int)public String getHost()
null if the clustered eventbus should try to pick one automaticallypublic EventBusOptions setHost(String host)
null.
When the clustered eventbus starts, it tries to bind to the provided host.
If host is null, 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.
host - the hostNetServerOptions.setHost(String)public int getPort()
setPort(int), or
using the --cluster-port command line option.NetServerOptions.getPort()public EventBusOptions setPort(int port)
port - the portNetServerOptions.setPort(int)public int getReconnectAttempts()
NetClientOptions.getReconnectAttempts()public EventBusOptions setReconnectAttempts(int attempts)
attempts - the maximum number of reconnect attemptsNetClientOptions.setReconnectAttempts(int)public long getReconnectInterval()
NetClientOptions.getReconnectInterval()public EventBusOptions setReconnectInterval(long interval)
interval - the reconnect interval in msNetClientOptions.setReconnectInterval(long)public EventBusOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class TCPSSLOptionscrlPath - the pathNullPointerExceptionpublic EventBusOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class TCPSSLOptionscrlValue - the valueNullPointerExceptionpublic EventBusOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class TCPSSLOptionssuite - the suiteTCPSSLOptions.getEnabledCipherSuites()public EventBusOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setIdleTimeout in class TCPSSLOptionsidleTimeout - the timeoutpublic EventBusOptions setReadIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setReadIdleTimeout in class TCPSSLOptionsidleTimeout - the read timeoutpublic EventBusOptions setWriteIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setWriteIdleTimeout in class TCPSSLOptionsidleTimeout - the write timeoutpublic EventBusOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptionssetIdleTimeoutUnit in class TCPSSLOptionsidleTimeoutUnit - specify time unit.public EventBusOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class TCPSSLOptionsoptions - the key store optionspublic EventBusOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class TCPSSLOptionsoptions - the key store in jks formatpublic EventBusOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class TCPSSLOptionsoptions - the options in pem formatpublic EventBusOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class TCPSSLOptionsoptions - the trust options in pem formatpublic EventBusOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class TCPSSLOptionsoptions - the key cert options in pfx formatpublic EventBusOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class TCPSSLOptionsoptions - the trust options in pfx formatpublic EventBusOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class TCPSSLOptionssoLinger - true if SO_linger is enabledpublic EventBusOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class TCPSSLOptionsssl - true if enabledpublic EventBusOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class TCPSSLOptionstcpKeepAlive - true if TCP keep alive is enabledpublic EventBusOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class TCPSSLOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public EventBusOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class TCPSSLOptionsoptions - the trust optionspublic EventBusOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class TCPSSLOptionsoptions - the trust options in jks formatpublic EventBusOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class TCPSSLOptionsreceiveBufferSize - the buffers size, in bytespublic EventBusOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class TCPSSLOptionsreuseAddress - the value of reuse addresspublic EventBusOptions setReusePort(boolean reusePort)
NetworkOptionssetReusePort in class TCPSSLOptionsreusePort - the value of reuse portpublic EventBusOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class TCPSSLOptionssendBufferSize - the buffers size, in bytespublic EventBusOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class TCPSSLOptionstrafficClass - the value of traffic classpublic EventBusOptions setUseAlpn(boolean useAlpn)
TCPSSLOptionssetUseAlpn in class TCPSSLOptionsuseAlpn - true when Application-Layer Protocol Negotiation should be usedpublic EventBusOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class TCPSSLOptionssslEngineOptions - the ssl engine to usepublic EventBusOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class TCPSSLOptionspublic EventBusOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class TCPSSLOptionspublic EventBusOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptionssetEnabledSecureTransportProtocols in class TCPSSLOptionsenabledSecureTransportProtocols - the SSL/TLS protocols to enablepublic EventBusOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsaddEnabledSecureTransportProtocol in class TCPSSLOptionsprotocol - the SSL/TLS protocol to enablepublic EventBusOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsremoveEnabledSecureTransportProtocol in class TCPSSLOptionsprotocol - the SSL/TLS protocol to disablepublic EventBusOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptionsTCP_FASTOPEN option - only with linux native transport.setTcpFastOpen in class TCPSSLOptionstcpFastOpen - the fast open valuepublic EventBusOptions setTcpCork(boolean tcpCork)
TCPSSLOptionsTCP_CORK option - only with linux native transport.setTcpCork in class TCPSSLOptionstcpCork - the cork valuepublic EventBusOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptionsTCP_QUICKACK option - only with linux native transport.setTcpQuickAck in class TCPSSLOptionstcpQuickAck - the quick ack valuepublic EventBusOptions setLogActivity(boolean logEnabled)
NetworkOptionssetLogActivity in class TCPSSLOptionslogEnabled - true for logging the network activitypublic EventBusOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptionssetSslHandshakeTimeout in class TCPSSLOptionssslHandshakeTimeout - the SSL handshake timeout to set, in millisecondspublic EventBusOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptionssetSslHandshakeTimeoutUnit in class TCPSSLOptionssslHandshakeTimeoutUnit - specify time unit.public EventBusOptions setTrustAll(boolean trustAll)
trustAll - true if all should be trustedNetClientOptions.setTrustAll(boolean)public boolean isTrustAll()
ClientOptionsBase.isTrustAll()public int getConnectTimeout()
ClientOptionsBase.getConnectTimeout()public EventBusOptions setConnectTimeout(int connectTimeout)
connectTimeout - connect timeout, in msNetClientOptions.setConnectTimeout(int)public long getClusterPingInterval()
public EventBusOptions setClusterPingInterval(long clusterPingInterval)
clusterPingInterval - The value of cluster ping interval, in ms.public long getClusterPingReplyInterval()
public EventBusOptions setClusterPingReplyInterval(long clusterPingReplyInterval)
clusterPingReplyInterval - The value of cluster ping reply interval, in ms.public String getClusterPublicHost()
public EventBusOptions setClusterPublicHost(String clusterPublicHost)
The default value is null which means use the same as the cluster hostname.
clusterPublicHost - the public host name to usepublic int getClusterPublicPort()
public EventBusOptions setClusterPublicPort(int clusterPublicPort)
setClusterPublicHost(String) for an explanation.clusterPublicPort - the public port to usepublic JsonObject getClusterNodeMetadata()
The data may be used by the NodeSelector to select a node for a given message.
For example, it could be used to implement a partioning strategy.
The default NodeSelector does not use the node metadata.
public EventBusOptions setClusterNodeMetadata(JsonObject clusterNodeMetadata)
The data may be used by the NodeSelector to select a node for a given message.
For example, it could be used to implement a partioning strategy.
The default NodeSelector does not use the node metadata.
clusterNodeMetadata - user-supplied information about this node when Vert.x is clusteredCopyright © 2022 Eclipse. All rights reserved.