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_BUFFERSDEFAULT_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
|
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 trustore
|
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, getKeyCertOptions, getSoLinger, getSslEngineOptions, getTrustOptions, hashCode, isSsl, isTcpKeepAlive, isTcpNoDelay, isUseAlpn, isUsePooledBuffers, setJdkSslEngineOptions, setLogActivity, setOpenSslEngineOptions, setSslEngineOptions, setUseAlpngetLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddresspublic 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 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.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.getClusterHost(), or using
the --cluster-host command line option.NetServerOptions.getHost()public EventBusOptions setHost(String host)
host - the hostNetServerOptions.setHost(String)public int getPort()
VertxOptions.getClusterPort() ()}, 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 suitepublic EventBusOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionssetIdleTimeout in class TCPSSLOptionsidleTimeout - the timeout, in secondspublic 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 setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptionssetUsePooledBuffers in class TCPSSLOptionsusePooledBuffers - true if pooled buffers enabledpublic NetworkOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class NetworkOptionsreceiveBufferSize - the buffers size, in bytespublic NetworkOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class NetworkOptionsreuseAddress - the value of reuse addresspublic NetworkOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class NetworkOptionssendBufferSize - the buffers size, in bytespublic NetworkOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class NetworkOptionstrafficClass - 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 © 2016. All rights reserved.