ClientOptionsBase

Base class for Client options

@author <a href="http://tfox.org">Tim Fox</a>

Constructors

this
this()

Default constructor

this
this(ClientOptionsBase other)

Copy constructor

Members

Functions

getConnectTimeout
Duration getConnectTimeout()

@return the value of connect timeout

getLocalAddress
string getLocalAddress()

@return the local interface to bind for network connections.

getMetricsName
string getMetricsName()

@return the metrics name identifying the reported metrics.

getProxyOptions
ProxyOptions getProxyOptions()

Get proxy options for connections

isTrustAll
bool isTrustAll()

@return true if all server certificates should be trusted

opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
setConnectTimeout
ClientOptionsBase setConnectTimeout(Duration connectTimeout)

Set the connect timeout

setIdleTimeout
ClientOptionsBase setIdleTimeout(Duration idleTimeout)
Undocumented in source. Be warned that the author may not have intended to support it.
setLocalAddress
ClientOptionsBase setLocalAddress(string localAddress)

Set the local interface to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.

setLogActivity
ClientOptionsBase setLogActivity(bool logEnabled)
Undocumented in source. Be warned that the author may not have intended to support it.
setMetricsName
ClientOptionsBase setMetricsName(string metricsName)

Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.

setOpenSslEngineOptions
ClientOptionsBase setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
Undocumented in source. Be warned that the author may not have intended to support it.
setProxyOptions
ClientOptionsBase setProxyOptions(ProxyOptions proxyOptions)

Set proxy options for connections via CONNECT proxy (e.g. Squid) or a SOCKS proxy.

setReceiveBufferSize
ClientOptionsBase setReceiveBufferSize(int receiveBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setReuseAddress
ClientOptionsBase setReuseAddress(bool reuseAddress)
Undocumented in source. Be warned that the author may not have intended to support it.
setReusePort
ClientOptionsBase setReusePort(bool reusePort)
Undocumented in source. Be warned that the author may not have intended to support it.
setSendBufferSize
ClientOptionsBase setSendBufferSize(int sendBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setSoLinger
ClientOptionsBase setSoLinger(int soLinger)
Undocumented in source. Be warned that the author may not have intended to support it.
setSsl
ClientOptionsBase setSsl(bool ssl)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpCork
ClientOptionsBase setTcpCork(bool tcpCork)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpFastOpen
ClientOptionsBase setTcpFastOpen(bool tcpFastOpen)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpKeepAlive
ClientOptionsBase setTcpKeepAlive(bool tcpKeepAlive)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpNoDelay
ClientOptionsBase setTcpNoDelay(bool tcpNoDelay)
Undocumented in source. Be warned that the author may not have intended to support it.
setTcpQuickAck
ClientOptionsBase setTcpQuickAck(bool tcpQuickAck)
Undocumented in source. Be warned that the author may not have intended to support it.
setTrafficClass
ClientOptionsBase setTrafficClass(int trafficClass)
Undocumented in source. Be warned that the author may not have intended to support it.
setTrustAll
ClientOptionsBase setTrustAll(bool trustAll)

Set whether all server certificates should be trusted

setUseAlpn
ClientOptionsBase setUseAlpn(bool useAlpn)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

DEFAULT_CONNECT_TIMEOUT
enum int DEFAULT_CONNECT_TIMEOUT;

The default value of connect timeout = 60000 ms

DEFAULT_METRICS_NAME
enum string DEFAULT_METRICS_NAME;

The default value of the client metrics = "":

DEFAULT_TRUST_ALL
enum bool DEFAULT_TRUST_ALL;

The default value of whether all servers (SSL/TLS) should be trusted = false

Inherited Members

From TcpSslOptions

DEFAULT_TCP_NO_DELAY
enum bool DEFAULT_TCP_NO_DELAY;

The default value of TCP-no-delay = true (Nagle disabled)

DEFAULT_TCP_KEEP_ALIVE
enum bool DEFAULT_TCP_KEEP_ALIVE;

The default value of TCP keep alive = false

DEFAULT_SO_LINGER
enum int DEFAULT_SO_LINGER;

The default value of SO_linger = -1

DEFAULT_USE_POOLED_BUFFERS
enum bool DEFAULT_USE_POOLED_BUFFERS;

The default value of Netty use pooled buffers = false

DEFAULT_SSL
enum bool DEFAULT_SSL;

SSL enable by default = false

DEFAULT_IDLE_TIMEOUT
enum Duration DEFAULT_IDLE_TIMEOUT;

Default idle timeout = 0

DEFAULT_KEEPALIVE_WAITTIME
enum Duration DEFAULT_KEEPALIVE_WAITTIME;

the interval between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe; after the connection is marked to need keepalive, this counter is not used any further

DEFAULT_KEEPALIVE_INTERVAL
enum Duration DEFAULT_KEEPALIVE_INTERVAL;

the interval between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime

DEFAULT_KEEPALIVE_PROBES
enum int DEFAULT_KEEPALIVE_PROBES;

the number of unacknowledged probes to send before considering the connection dead and notifying the application layer

DEFAULT_USE_ALPN
enum bool DEFAULT_USE_ALPN;

Default use alpn = false

DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS
enum string[] DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS;

The default ENABLED_SECURE_TRANSPORT_PROTOCOLS value = { "SSLv2Hello", "TLSv1", "TLSv1.1", "TLSv1.2" } <p/> SSLv3 is NOT enabled due to POODLE vulnerability http://en.wikipedia.org/wiki/POODLE <p/> "SSLv2Hello" is NOT enabled since it's disabled by default since JDK7

DEFAULT_TCP_FAST_OPEN
enum bool DEFAULT_TCP_FAST_OPEN;

The default TCP_FASTOPEN value = false

DEFAULT_TCP_CORK
enum bool DEFAULT_TCP_CORK;

The default TCP_CORK value = false

DEFAULT_TCP_QUICKACK
enum bool DEFAULT_TCP_QUICKACK;

The default TCP_QUICKACK value = false

DEFAULT_SSL_HANDSHAKE_TIMEOUT
enum Duration DEFAULT_SSL_HANDSHAKE_TIMEOUT;

The default value of SSL handshake timeout = 10 SECONDS

DEFAULT_RETRY_TIMES
enum int DEFAULT_RETRY_TIMES;
Undocumented in source.
DEFAULT_RETRY_INTERVAL
enum Duration DEFAULT_RETRY_INTERVAL;
Undocumented in source.
isTcpNoDelay
bool isTcpNoDelay()

@return TCP no delay enabled ?

setTcpNoDelay
TcpSslOptions setTcpNoDelay(bool tcpNoDelay)

Set whether TCP no delay is enabled

isTcpKeepAlive
bool isTcpKeepAlive()

@return is TCP keep alive enabled?

setTcpKeepAlive
TcpSslOptions setTcpKeepAlive(bool tcpKeepAlive)

Set whether TCP keep alive is enabled

getSoLinger
int getSoLinger()

@return is SO_linger enabled

setSoLinger
TcpSslOptions setSoLinger(int soLinger)

Set whether SO_linger keep alive is enabled

setIdleTimeout
TcpSslOptions setIdleTimeout(Duration value)

Set the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.

getIdleTimeout
Duration getIdleTimeout()

@return the idle timeout, in time unit specified by {@link #getIdleTimeoutUnit()}.

setKeepaliveWaitTime
TcpSslOptions setKeepaliveWaitTime(Duration value)
Undocumented in source. Be warned that the author may not have intended to support it.
getKeepaliveWaitTime
Duration getKeepaliveWaitTime()
Undocumented in source. Be warned that the author may not have intended to support it.
setKeepaliveInterval
TcpSslOptions setKeepaliveInterval(Duration value)
Undocumented in source. Be warned that the author may not have intended to support it.
getKeepaliveInterval
Duration getKeepaliveInterval()
Undocumented in source. Be warned that the author may not have intended to support it.
setKeepaliveProbes
TcpSslOptions setKeepaliveProbes(int times)
Undocumented in source. Be warned that the author may not have intended to support it.
getKeepaliveProbes
int getKeepaliveProbes()
Undocumented in source. Be warned that the author may not have intended to support it.
isSsl
bool isSsl()

@return is SSL/TLS enabled?

setSsl
TcpSslOptions setSsl(bool ssl)

Set whether SSL/TLS is enabled

getKeyCertOptions
KeyCertOptions getKeyCertOptions()

@return the key/cert options

setKeyCertOptions
TcpSslOptions setKeyCertOptions(KeyCertOptions options)

Set the key/cert options.

getPemKeyCertOptions
PemKeyCertOptions getPemKeyCertOptions()

Get the key/cert store options in pem format.

setPemKeyCertOptions
TcpSslOptions setPemKeyCertOptions(PemKeyCertOptions options)

Set the key/cert store options in pem format. @param options the options in pem format @return a reference to this, so the API can be used fluently

isUseAlpn
bool isUseAlpn()

@return whether to use or not Application-Layer Protocol Negotiation

setUseAlpn
TcpSslOptions setUseAlpn(bool useAlpn)

Set the ALPN usage.

getOpenSslEngineOptions
OpenSSLEngineOptions getOpenSslEngineOptions()

Set to use SSL engine implementation to use.

setOpenSslEngineOptions
TcpSslOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
Undocumented in source. Be warned that the author may not have intended to support it.
isTcpFastOpen
bool isTcpFastOpen()

@return wether {@code TCP_FASTOPEN} option is enabled

setTcpFastOpen
TcpSslOptions setTcpFastOpen(bool tcpFastOpen)

Enable the {@code TCP_FASTOPEN} option - only with linux native transport.

isTcpCork
bool isTcpCork()

@return wether {@code TCP_CORK} option is enabled

setTcpCork
TcpSslOptions setTcpCork(bool tcpCork)

Enable the {@code TCP_CORK} option - only with linux native transport.

isTcpQuickAck
bool isTcpQuickAck()

@return wether {@code TCP_QUICKACK} option is enabled

setTcpQuickAck
TcpSslOptions setTcpQuickAck(bool tcpQuickAck)

Enable the {@code TCP_QUICKACK} option - only with linux native transport.

getSslHandshakeTimeout
Duration getSslHandshakeTimeout()

@return the SSL handshake timeout, in time unit specified by {@link #getSslHandshakeTimeoutUnit()}.

setSslHandshakeTimeout
TcpSslOptions setSslHandshakeTimeout(Duration sslHandshakeTimeout)

Set the SSL handshake timeout, default time unit is seconds.

setLogActivity
TcpSslOptions setLogActivity(bool logEnabled)
Undocumented in source. Be warned that the author may not have intended to support it.
setSendBufferSize
TcpSslOptions setSendBufferSize(int sendBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setReceiveBufferSize
TcpSslOptions setReceiveBufferSize(int receiveBufferSize)
Undocumented in source. Be warned that the author may not have intended to support it.
setTrafficClass
TcpSslOptions setTrafficClass(int trafficClass)
Undocumented in source. Be warned that the author may not have intended to support it.
setReuseAddress
TcpSslOptions setReuseAddress(bool reuseAddress)
Undocumented in source. Be warned that the author may not have intended to support it.
setReusePort
TcpSslOptions setReusePort(bool reusePort)
Undocumented in source. Be warned that the author may not have intended to support it.
setRetryTimes
TcpSslOptions setRetryTimes(int times)
Undocumented in source. Be warned that the author may not have intended to support it.
getRetryTimes
int getRetryTimes()
Undocumented in source. Be warned that the author may not have intended to support it.
setRetryInterval
TcpSslOptions setRetryInterval(Duration timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
getRetryInterval
Duration getRetryInterval()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toStreamOptions
TcpStreamOptions toStreamOptions()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta