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 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_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS
DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, 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.
|
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 port 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 |
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 |
setHost(String host)
Sets the host.
|
EventBusOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, in seconds.
|
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 |
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.
|
NetworkOptions |
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.
|
NetworkOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
NetworkOptions |
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 |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
EventBusOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
NetworkOptions |
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 |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
JsonObject |
toJson()
Builds a JSON object representing the current
EventBusOptions . |
addEnabledSecureTransportProtocol, equals, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getTrustOptions, getTrustStoreOptions, hashCode, isSsl, isTcpKeepAlive, isTcpNoDelay, isUseAlpn, isUsePooledBuffers, setJdkSslEngineOptions, setLogActivity, setOpenSslEngineOptions, setSslEngineOptions, setUseAlpn
getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress
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()
VertxOptions.setClusterHost(String)
, or using
the --cluster-host
command line option.NetServerOptions.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
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 NetworkOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptions
setReceiveBufferSize
in class NetworkOptions
receiveBufferSize
- the buffers size, in bytespublic NetworkOptions setReuseAddress(boolean reuseAddress)
NetworkOptions
setReuseAddress
in class NetworkOptions
reuseAddress
- the value of reuse addresspublic NetworkOptions setSendBufferSize(int sendBufferSize)
NetworkOptions
setSendBufferSize
in class NetworkOptions
sendBufferSize
- the buffers size, in bytespublic NetworkOptions setTrafficClass(int trafficClass)
NetworkOptions
setTrafficClass
in class NetworkOptions
trafficClass
- the value of traffic classpublic boolean isClustered()
VertxOptions.setClustered(boolean)
method or from the --cluster
option from the command
line.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()
The value can be configured from VertxOptions.setClusterPingInterval(long)
.
public EventBusOptions setClusterPingInterval(long clusterPingInterval)
clusterPingInterval
- The value of cluster ping interval, in ms.public long getClusterPingReplyInterval()
The value can be configured from VertxOptions.setClusterPingReplyInterval(long)
}.
public EventBusOptions setClusterPingReplyInterval(long clusterPingReplyInterval)
clusterPingReplyInterval
- The value of cluster ping reply interval, in ms.public String getClusterPublicHost()
It can be configured using VertxOptions.setClusterPublicHost(String)
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()
This can be configured from VertxOptions.setClusterPublicPort(int)
.
public EventBusOptions setClusterPublicPort(int clusterPublicPort)
setClusterPublicHost(String)
for an explanation.clusterPublicPort
- the public port to useCopyright © 2017. All rights reserved.