public class NetClientOptions extends ClientOptionsBase
NetClient.| Modifier and Type | Field and Description |
|---|---|
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
|
DEFAULT_CONNECT_TIMEOUT, DEFAULT_TRUST_ALLDEFAULT_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_POOLED_BUFFERSDEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
NetClientOptions()
The default constructor
|
NetClientOptions(JsonObject json)
Create options from JSON
|
NetClientOptions(NetClientOptions other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
NetClientOptions |
addCrlPath(String crlPath)
Add a CRL path
|
NetClientOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
NetClientOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite
|
boolean |
equals(Object o) |
int |
getReconnectAttempts() |
long |
getReconnectInterval() |
int |
hashCode() |
NetClientOptions |
setConnectTimeout(int connectTimeout)
Set the connect timeout
|
NetClientOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, in seconds.
|
NetClientOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
NetClientOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
NetClientOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
NetClientOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
NetClientOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
NetClientOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
NetClientOptions |
setReconnectAttempts(int attempts)
Set the value of reconnect attempts
|
NetClientOptions |
setReconnectInterval(long interval)
Set the reconnect interval
|
NetClientOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
NetClientOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
NetClientOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
NetClientOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
NetClientOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
NetClientOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
NetClientOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
NetClientOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted
|
NetClientOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java trustore
|
NetClientOptions |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
getConnectTimeout, isTrustAllgetCrlPaths, getCrlValues, getEnabledCipherSuites, getIdleTimeout, getKeyCertOptions, getSoLinger, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUsePooledBuffersgetReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddresspublic static final int DEFAULT_RECONNECT_ATTEMPTS
public static final long DEFAULT_RECONNECT_INTERVAL
public NetClientOptions()
public NetClientOptions(NetClientOptions other)
other - the options to copypublic NetClientOptions(JsonObject json)
json - the JSONpublic NetClientOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class NetworkOptionssendBufferSize - the buffers size, in bytespublic NetClientOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class NetworkOptionsreceiveBufferSize - the buffers size, in bytespublic NetClientOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class NetworkOptionsreuseAddress - the value of reuse addresspublic NetClientOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class NetworkOptionstrafficClass - the value of traffic classpublic NetClientOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class TCPSSLOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public NetClientOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class TCPSSLOptionstcpKeepAlive - true if TCP keep alive is enabledpublic NetClientOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class TCPSSLOptionssoLinger - true if SO_linger is enabledpublic NetClientOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptionssetUsePooledBuffers in class TCPSSLOptionsusePooledBuffers - true if pooled buffers enabledpublic NetClientOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionssetIdleTimeout in class TCPSSLOptionsidleTimeout - the timeout, in secondspublic NetClientOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class TCPSSLOptionsssl - true if enabledpublic NetClientOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class TCPSSLOptionsoptions - the key store in jks formatpublic NetClientOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class TCPSSLOptionsoptions - the key cert options in pfx formatpublic NetClientOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class TCPSSLOptionsoptions - the options in pem formatpublic NetClientOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class TCPSSLOptionsoptions - the options in jks formatpublic NetClientOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class TCPSSLOptionsoptions - the options in pem formatpublic NetClientOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class TCPSSLOptionsoptions - the options in pfx formatpublic NetClientOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class TCPSSLOptionssuite - the suitepublic NetClientOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class TCPSSLOptionscrlPath - the pathNullPointerExceptionpublic NetClientOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class TCPSSLOptionscrlValue - the valueNullPointerExceptionpublic NetClientOptions setTrustAll(boolean trustAll)
ClientOptionsBasesetTrustAll in class ClientOptionsBasetrustAll - true if all should be trustedpublic NetClientOptions setConnectTimeout(int connectTimeout)
ClientOptionsBasesetConnectTimeout in class ClientOptionsBaseconnectTimeout - connect timeout, in mspublic NetClientOptions setReconnectAttempts(int attempts)
attempts - the maximum number of reconnect attemptspublic int getReconnectAttempts()
public NetClientOptions setReconnectInterval(long interval)
interval - the reconnect interval in mspublic long getReconnectInterval()
public boolean equals(Object o)
equals in class ClientOptionsBasepublic int hashCode()
hashCode in class ClientOptionsBaseCopyright © 2015. All rights reserved.