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 hostname to use when clustering = "localhost"
|
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 port to use when clustering = 0 (meaning assign a random port)
|
static String |
DEFAULT_CLUSTER_PUBLIC_HOST
The default cluster public host to use = null which means use the same as the cluster host
|
static int |
DEFAULT_CLUSTER_PUBLIC_PORT
The default cluster public port to use = -1 which means use the same as the cluster port
|
static boolean |
DEFAULT_CLUSTERED
The default value of whether Vert.x is clustered = false.
|
static int |
DEFAULT_CONNECT_TIMEOUT
The default value of connect timeout = 60000 ms
|
static String |
DEFAULT_HOST
The default host to listen on = "0.0.0.0" (meaning listen on all available interfaces).
|
static int |
DEFAULT_PORT
The default port to listen on = 0 (meaning a random ephemeral free port will be chosen)
|
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_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_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS
DEFAULT_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() |
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 |
isClustered() |
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 |
setClustered(boolean clustered)
Sets whether or not the event bus 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 |
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 |
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 |
setTcpUserTimeout(int tcpUserTimeout)
Sets the
TCP_USER_TIMEOUT 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 |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
JsonObject |
toJson()
Builds a JSON object representing the current
EventBusOptions . |
equals, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, hashCode, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, isUsePooledBuffers, setIdleTimeoutUnit
getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
public static final boolean DEFAULT_CLUSTERED
public 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_PORT
public static final String DEFAULT_HOST
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 EventBusOptions
public 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 TCPSSLOptions
public 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()
public EventBusOptions setHost(String host)
host
- the hostNetServerOptions.setHost(String)
public int getPort()
VertxOptions.setClusterPort(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
TCPSSLOptions
addCrlPath
in class TCPSSLOptions
crlPath
- the pathNullPointerException
public EventBusOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptions
addCrlValue
in class TCPSSLOptions
crlValue
- the valueNullPointerException
public EventBusOptions addEnabledCipherSuite(String suite)
TCPSSLOptions
addEnabledCipherSuite
in class TCPSSLOptions
suite
- the suitepublic EventBusOptions setIdleTimeout(int idleTimeout)
TCPSSLOptions
TCPSSLOptions.setIdleTimeoutUnit(TimeUnit)
setIdleTimeout
in class TCPSSLOptions
idleTimeout
- the timeout, in secondspublic EventBusOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptions
setKeyCertOptions
in class TCPSSLOptions
options
- the key store optionspublic EventBusOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptions
setKeyStoreOptions
in class TCPSSLOptions
options
- the key store in jks formatpublic EventBusOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptions
setPemKeyCertOptions
in class TCPSSLOptions
options
- the options in pem formatpublic EventBusOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptions
setPemTrustOptions
in class TCPSSLOptions
options
- the trust options in pem formatpublic EventBusOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptions
setPfxKeyCertOptions
in class TCPSSLOptions
options
- the key cert options in pfx formatpublic EventBusOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptions
setPfxTrustOptions
in class TCPSSLOptions
options
- the trust options in pfx formatpublic EventBusOptions setSoLinger(int soLinger)
TCPSSLOptions
setSoLinger
in class TCPSSLOptions
soLinger
- true if SO_linger is enabledpublic EventBusOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class TCPSSLOptions
ssl
- true if enabledpublic EventBusOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptions
setTcpKeepAlive
in class TCPSSLOptions
tcpKeepAlive
- true if TCP keep alive is enabledpublic EventBusOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptions
setTcpNoDelay
in class TCPSSLOptions
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)public EventBusOptions setTrustOptions(TrustOptions options)
TCPSSLOptions
setTrustOptions
in class TCPSSLOptions
options
- the trust optionspublic EventBusOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptions
setTrustStoreOptions
in class TCPSSLOptions
options
- the trust options in jks formatpublic EventBusOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptions
setUsePooledBuffers
in class TCPSSLOptions
usePooledBuffers
- true if pooled buffers enabledpublic EventBusOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptions
setReceiveBufferSize
in class TCPSSLOptions
receiveBufferSize
- the buffers size, in bytespublic EventBusOptions setReuseAddress(boolean reuseAddress)
NetworkOptions
setReuseAddress
in class TCPSSLOptions
reuseAddress
- the value of reuse addresspublic EventBusOptions setReusePort(boolean reusePort)
NetworkOptions
setReusePort
in class TCPSSLOptions
reusePort
- the value of reuse portpublic EventBusOptions setSendBufferSize(int sendBufferSize)
NetworkOptions
setSendBufferSize
in class TCPSSLOptions
sendBufferSize
- the buffers size, in bytespublic EventBusOptions setTrafficClass(int trafficClass)
NetworkOptions
setTrafficClass
in class TCPSSLOptions
trafficClass
- the value of traffic classpublic EventBusOptions setUseAlpn(boolean useAlpn)
TCPSSLOptions
setUseAlpn
in class TCPSSLOptions
useAlpn
- true when Application-Layer Protocol Negotiation should be usedpublic EventBusOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptions
setSslEngineOptions
in class TCPSSLOptions
sslEngineOptions
- the ssl engine to usepublic EventBusOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions
in class TCPSSLOptions
public EventBusOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions
in class TCPSSLOptions
public EventBusOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptions
setEnabledSecureTransportProtocols
in class TCPSSLOptions
enabledSecureTransportProtocols
- the SSL/TLS protocols to enablepublic EventBusOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptions
addEnabledSecureTransportProtocol
in class TCPSSLOptions
protocol
- the SSL/TLS protocol to enablepublic EventBusOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptions
removeEnabledSecureTransportProtocol
in class TCPSSLOptions
protocol
- the SSL/TLS protocol to disablepublic EventBusOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptions
TCP_FASTOPEN
option - only with linux native transport.setTcpFastOpen
in class TCPSSLOptions
tcpFastOpen
- the fast open valuepublic EventBusOptions setTcpCork(boolean tcpCork)
TCPSSLOptions
TCP_CORK
option - only with linux native transport.setTcpCork
in class TCPSSLOptions
tcpCork
- the cork valuepublic EventBusOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptions
TCP_QUICKACK
option - only with linux native transport.setTcpQuickAck
in class TCPSSLOptions
tcpQuickAck
- the quick ack valuepublic EventBusOptions setTcpUserTimeout(int tcpUserTimeout)
TCPSSLOptions
TCP_USER_TIMEOUT
option - only with linux native transport.setTcpUserTimeout
in class TCPSSLOptions
tcpUserTimeout
- the tcp user timeout valuepublic EventBusOptions setLogActivity(boolean logEnabled)
NetworkOptions
setLogActivity
in class TCPSSLOptions
logEnabled
- true for logging the network activitypublic EventBusOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptions
setSslHandshakeTimeout
in class TCPSSLOptions
sslHandshakeTimeout
- the SSL handshake timeout to set, in millisecondspublic EventBusOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptions
setSslHandshakeTimeoutUnit
in class TCPSSLOptions
sslHandshakeTimeoutUnit
- specify time unit.public boolean isClustered()
public EventBusOptions setClustered(boolean clustered)
clustered
- true
to start the event bus as a clustered event bus.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 useCopyright © 2023 Eclipse. All rights reserved.