public class NetClientOptions extends ClientOptionsBase
NetClient.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM
Default value to determine hostname verification algorithm hostname verification (for SSL/TLS) = ""
|
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_METRICS_NAME, DEFAULT_TRUST_ALLDEFAULT_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_USE_ALPNDEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, 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, appended to the ordered suites.
|
NetClientOptions |
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.
|
String |
getHostnameVerificationAlgorithm() |
int |
getReconnectAttempts() |
long |
getReconnectInterval() |
NetClientOptions |
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.
|
NetClientOptions |
setConnectTimeout(int connectTimeout)
Set the connect timeout
|
NetClientOptions |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.
|
NetClientOptions |
setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
Set the hostname verification algorithm interval
To disable hostname verification, set hostnameVerificationAlgorithm to an empty String
|
NetClientOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.
|
NetClientOptions |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.
|
NetClientOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
NetClientOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
NetClientOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
NetClientOptions |
setLocalAddress(String localAddress)
Set the local interface to bind for network connections.
|
NetClientOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
NetClientOptions |
setMetricsName(String metricsName)
Set the metrics name identifying the reported metrics, useful for grouping metrics
with the same name.
|
ClientOptionsBase |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
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 |
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for connections via CONNECT proxy (e.g.
|
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 |
setReusePort(boolean reusePort)
Set the value of reuse port.
|
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 |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
NetClientOptions |
setSslHandshakeTimeout(long sslHandshakeTimeout)
Set the SSL handshake timeout, default time unit is seconds.
|
NetClientOptions |
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Set the SSL handshake timeout unit.
|
NetClientOptions |
setTcpCork(boolean tcpCork)
Enable the
TCP_CORK option - only with linux native transport. |
NetClientOptions |
setTcpFastOpen(boolean tcpFastOpen)
Enable the
TCP_FASTOPEN option - only with linux native transport. |
NetClientOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
NetClientOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
NetClientOptions |
setTcpQuickAck(boolean tcpQuickAck)
Enable the
TCP_QUICKACK option - only with linux native transport. |
NetClientOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
NetClientOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted
|
NetClientOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
NetClientOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
NetClientOptions |
setUseAlpn(boolean useAlpn)
Set the ALPN usage.
|
getConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAll, toJsongetCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpngetLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic static final int DEFAULT_RECONNECT_ATTEMPTS
public static final long DEFAULT_RECONNECT_INTERVAL
public static final String DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM
public NetClientOptions()
public NetClientOptions(NetClientOptions other)
other - the options to copypublic NetClientOptions(JsonObject json)
json - the JSONpublic NetClientOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class ClientOptionsBasesendBufferSize - the buffers size, in bytespublic NetClientOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class ClientOptionsBasereceiveBufferSize - the buffers size, in bytespublic NetClientOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class ClientOptionsBasereuseAddress - the value of reuse addresspublic NetClientOptions setReusePort(boolean reusePort)
NetworkOptionssetReusePort in class ClientOptionsBasereusePort - the value of reuse portpublic NetClientOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class ClientOptionsBasetrafficClass - the value of traffic classpublic NetClientOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class ClientOptionsBasetcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public NetClientOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class ClientOptionsBasetcpKeepAlive - true if TCP keep alive is enabledpublic NetClientOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class ClientOptionsBasesoLinger - true if SO_linger is enabledpublic NetClientOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setIdleTimeout in class ClientOptionsBaseidleTimeout - the timeout, in secondspublic NetClientOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptionssetIdleTimeoutUnit in class ClientOptionsBaseidleTimeoutUnit - specify time unit.public NetClientOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class ClientOptionsBasessl - true if enabledpublic NetClientOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class ClientOptionsBaseoptions - the key store optionspublic NetClientOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class ClientOptionsBaseoptions - the key store in jks formatpublic NetClientOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class ClientOptionsBaseoptions - the key cert options in pfx formatpublic NetClientOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class ClientOptionsBaseoptions - the options in pem formatpublic NetClientOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class ClientOptionsBaseoptions - the trust optionspublic NetClientOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class ClientOptionsBaseoptions - the trust options in jks formatpublic NetClientOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class ClientOptionsBaseoptions - the trust options in pem formatpublic NetClientOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class ClientOptionsBaseoptions - the trust options in pfx formatpublic NetClientOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class ClientOptionsBasesuite - the suitepublic NetClientOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsaddEnabledSecureTransportProtocol in class ClientOptionsBaseprotocol - the SSL/TLS protocol to enablepublic NetClientOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsremoveEnabledSecureTransportProtocol in class ClientOptionsBaseprotocol - the SSL/TLS protocol to disablepublic NetClientOptions setUseAlpn(boolean useAlpn)
TCPSSLOptionssetUseAlpn in class ClientOptionsBaseuseAlpn - true when Application-Layer Protocol Negotiation should be usedpublic NetClientOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class ClientOptionsBasesslEngineOptions - the ssl engine to usepublic NetClientOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class ClientOptionsBasepublic NetClientOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptionsTCP_FASTOPEN option - only with linux native transport.setTcpFastOpen in class ClientOptionsBasetcpFastOpen - the fast open valuepublic NetClientOptions setTcpCork(boolean tcpCork)
TCPSSLOptionsTCP_CORK option - only with linux native transport.setTcpCork in class ClientOptionsBasetcpCork - the cork valuepublic NetClientOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptionsTCP_QUICKACK option - only with linux native transport.setTcpQuickAck in class ClientOptionsBasetcpQuickAck - the quick ack valuepublic ClientOptionsBase setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class ClientOptionsBasepublic NetClientOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class ClientOptionsBasecrlPath - the pathNullPointerExceptionpublic NetClientOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class ClientOptionsBasecrlValue - 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 setMetricsName(String metricsName)
ClientOptionsBasesetMetricsName in class ClientOptionsBasemetricsName - the metrics namepublic NetClientOptions setReconnectAttempts(int attempts)
attempts - the maximum number of reconnect attemptspublic int getReconnectAttempts()
public NetClientOptions setReconnectInterval(long interval)
interval - the reconnect interval in mspublic String getHostnameVerificationAlgorithm()
public NetClientOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
hostnameVerificationAlgorithm - should be HTTPS, LDAPS or an empty Stringpublic long getReconnectInterval()
public NetClientOptions setLogActivity(boolean logEnabled)
NetworkOptionssetLogActivity in class ClientOptionsBaselogEnabled - true for logging the network activitypublic NetClientOptions setProxyOptions(ProxyOptions proxyOptions)
ClientOptionsBasesetProxyOptions in class ClientOptionsBaseproxyOptions - proxy options objectpublic NetClientOptions setLocalAddress(String localAddress)
ClientOptionsBasesetLocalAddress in class ClientOptionsBaselocalAddress - the local addresspublic NetClientOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptionssetEnabledSecureTransportProtocols in class TCPSSLOptionsenabledSecureTransportProtocols - the SSL/TLS protocols to enablepublic NetClientOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptionssetSslHandshakeTimeout in class TCPSSLOptionssslHandshakeTimeout - the SSL handshake timeout to set, in millisecondspublic NetClientOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptionssetSslHandshakeTimeoutUnit in class TCPSSLOptionssslHandshakeTimeoutUnit - specify time unit.Copyright © 2021 Eclipse. All rights reserved.