Top Description Fields Constructors Methods
io.vertx.core.net

public Class NetClientOptions

extends ClientOptionsBase
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.netty.handler.logging.ByteBufFormat, io.vertx.codegen.annotations.DataObject, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.buffer.Buffer, io.vertx.core.json.JsonObject, java.util.ArrayList, .List, .Objects, .Set, java.util.concurrent.TimeUnit

Options for configuring a io.vertx.core.net.NetClient.
Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private List<String>
public static final String
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM

Default value to determine hostname verification algorithm hostname verification (for SSL/TLS) = null

public static final int
DEFAULT_RECONNECT_ATTEMPTS

The default value for reconnect attempts = 0

public static final long
DEFAULT_RECONNECT_INTERVAL

The default value for reconnect interval = 1000 ms

public static final boolean
DEFAULT_REGISTER_WRITE_HANDLER

Whether a write-handler should be registered by default = false.

private String
private int
private long
private boolean
Inherited from io.vertx.core.net.ClientOptionsBase:
DEFAULT_CONNECT_TIMEOUTDEFAULT_METRICS_NAMEDEFAULT_TRUST_ALL

Constructor Summary

AccessConstructor and Description
public
NetClientOptions()

The default constructor

public
NetClientOptions(NetClientOptions
the options to copy
other
)

Copy constructor

public
NetClientOptions(ClientOptionsBase
the options to copy
other
)

Create an instance copying the values from other and using the defaults of NetClientOptions.

public
NetClientOptions(JsonObject
the JSON
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Create options from JSON

Method Summary

Modifier and TypeMethod and Description
public NetClientOptions
addCrlPath(String
the path
crlPath
)

Overrides io.vertx.core.net.ClientOptionsBase.addCrlPath.

Add a CRL path

public NetClientOptions
addCrlValue(Buffer
the value
crlValue
)

Overrides io.vertx.core.net.ClientOptionsBase.addCrlValue.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Add a CRL value

public NetClientOptions
addEnabledCipherSuite(String
the suite
suite
)

Overrides io.vertx.core.net.ClientOptionsBase.addEnabledCipherSuite.

Add an enabled cipher suite, appended to the ordered suites.

public NetClientOptions
addEnabledSecureTransportProtocol(final String
the SSL/TLS protocol to enable
protocol
)

Overrides io.vertx.core.net.ClientOptionsBase.addEnabledSecureTransportProtocol.

Add an enabled SSL/TLS protocols, appended to the ordered protocols.

public NetClientOptions
addNonProxyHost(String
the added host
nonProxyHost
)

Overrides io.vertx.core.net.ClientOptionsBase.addNonProxyHost.

Add a host to the getNonProxyHosts() list.

public List<String>

Returns:

the list of application-layer protocols send during the Application-Layer Protocol Negotiation.
getApplicationLayerProtocols
()

public String

Returns:

the value of the hostname verification algorithm
getHostnameVerificationAlgorithm
()

public int

Returns:

the value of reconnect attempts
getReconnectAttempts
()

public long

Returns:

the value of reconnect interval
getReconnectInterval
()

private void
public boolean

Returns:

true if a write-handler should be registered on the io.vertx.core.eventbus.EventBus, otherwise false
isRegisterWriteHandler
()

public NetClientOptions
removeEnabledCipherSuite(String
the suite
suite
)

Overrides io.vertx.core.net.ClientOptionsBase.removeEnabledCipherSuite.

Removes an enabled cipher suite from the ordered suites.

public NetClientOptions
removeEnabledSecureTransportProtocol(String
the SSL/TLS protocol to disable
protocol
)

Overrides io.vertx.core.net.ClientOptionsBase.removeEnabledSecureTransportProtocol.

Removes an enabled SSL/TLS protocol from the ordered protocols.

public NetClientOptions
setActivityLogDataFormat(ByteBufFormat
the format to use
activityLogDataFormat
)

Overrides io.vertx.core.net.ClientOptionsBase.setActivityLogDataFormat.

Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.

public NetClientOptions

Returns:

a reference to this, so the API can be used fluently
setApplicationLayerProtocols
(List<String>
the protocols
protocols
)

Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.

public NetClientOptions
setConnectTimeout(int
connect timeout, in ms
connectTimeout
)

Overrides io.vertx.core.net.ClientOptionsBase.setConnectTimeout.

Set the connect timeout

public NetClientOptions
setEnabledSecureTransportProtocols(Set<String>
the SSL/TLS protocols to enable
enabledSecureTransportProtocols
)

Overrides io.vertx.core.net.TCPSSLOptions.setEnabledSecureTransportProtocols.

Sets the list of enabled SSL/TLS protocols.

public NetClientOptions

Returns:

a reference to this, so the API can be used fluently
setHostnameVerificationAlgorithm
(String
should be HTTPS, LDAPS or an empty String
hostnameVerificationAlgorithm
)

Set the hostname verification algorithm interval To disable hostname verification, set hostnameVerificationAlgorithm to an empty String

public NetClientOptions
setIdleTimeout(int
the timeout
idleTimeout
)

Overrides io.vertx.core.net.ClientOptionsBase.setIdleTimeout.

Set the idle timeout, default time unit is seconds.

public NetClientOptions
setIdleTimeoutUnit(TimeUnit
specify time unit.
idleTimeoutUnit
)

Overrides io.vertx.core.net.ClientOptionsBase.setIdleTimeoutUnit.

Set the idle timeout unit.

public NetClientOptions
public NetClientOptions
setKeyCertOptions(KeyCertOptions
the key store options
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setKeyCertOptions.

Set the key/cert options.

public NetClientOptions
setKeyStoreOptions(JksOptions
the key store in jks format
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setKeyStoreOptions.

Deprecated

Set the key/cert options in jks format, aka Java keystore.

public NetClientOptions
setLocalAddress(String
the local address
localAddress
)

Overrides io.vertx.core.net.ClientOptionsBase.setLocalAddress.

Set the local interface to bind for network connections.

public NetClientOptions
setLogActivity(boolean
true for logging the network activity
logEnabled
)

Overrides io.vertx.core.net.ClientOptionsBase.setLogActivity.

Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.

public NetClientOptions
setMetricsName(String
the metrics name
metricsName
)

Overrides io.vertx.core.net.ClientOptionsBase.setMetricsName.

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

public NetClientOptions
setNonProxyHosts(List<String>
the list of non proxies hosts
nonProxyHosts
)

Overrides io.vertx.core.net.ClientOptionsBase.setNonProxyHosts.

Set a list of remote hosts that are not proxied when the client is configured to use a proxy.

public ClientOptionsBase
public NetClientOptions
setPemKeyCertOptions(PemKeyCertOptions
the options in pem format
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setPemKeyCertOptions.

Deprecated

Set the key/cert store options in pem format.

public NetClientOptions
setPemTrustOptions(PemTrustOptions
the trust options in pem format
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setPemTrustOptions.

Deprecated

Set the trust options in pem format

public NetClientOptions
setPfxKeyCertOptions(PfxOptions
the key cert options in pfx format
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setPfxKeyCertOptions.

Deprecated

Set the key/cert options in pfx format.

public NetClientOptions
setPfxTrustOptions(PfxOptions
the trust options in pfx format
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setPfxTrustOptions.

Deprecated

Set the trust options in pfx format

public NetClientOptions
setProxyOptions(ProxyOptions
proxy options object
proxyOptions
)

Overrides io.vertx.core.net.ClientOptionsBase.setProxyOptions.

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

public NetClientOptions
setReadIdleTimeout(int
the read timeout
idleTimeout
)

Overrides io.vertx.core.net.ClientOptionsBase.setReadIdleTimeout.

Set the read idle timeout, default time unit is seconds.

public NetClientOptions
setReceiveBufferSize(int
the buffers size, in bytes
receiveBufferSize
)

Overrides io.vertx.core.net.ClientOptionsBase.setReceiveBufferSize.

Set the TCP receive buffer size

public NetClientOptions

Returns:

a reference to this, so the API can be used fluently
setReconnectAttempts
(int
the maximum number of reconnect attempts
attempts
)

Set the value of reconnect attempts

public NetClientOptions

Returns:

a reference to this, so the API can be used fluently
setReconnectInterval
(long
the reconnect interval in ms
interval
)

Set the reconnect interval

public NetClientOptions

Returns:

a reference to this, so the API can be used fluently
setRegisterWriteHandler
(boolean
true to register a write-handler
registerWriteHandler
)

Whether a write-handler should be registered on the io.vertx.core.eventbus.EventBus.

public NetClientOptions
setReuseAddress(boolean
the value of reuse address
reuseAddress
)

Overrides io.vertx.core.net.ClientOptionsBase.setReuseAddress.

Set the value of reuse address

public NetClientOptions
setReusePort(boolean
the value of reuse port
reusePort
)

Overrides io.vertx.core.net.ClientOptionsBase.setReusePort.

Set the value of reuse port.

public NetClientOptions
setSendBufferSize(int
the buffers size, in bytes
sendBufferSize
)

Overrides io.vertx.core.net.ClientOptionsBase.setSendBufferSize.

Set the TCP send buffer size

public NetClientOptions
setSoLinger(int
true if SO_linger is enabled
soLinger
)

Overrides io.vertx.core.net.ClientOptionsBase.setSoLinger.

Set whether SO_linger keep alive is enabled

public NetClientOptions
setSsl(boolean
true if enabled
ssl
)

Overrides io.vertx.core.net.ClientOptionsBase.setSsl.

Set whether SSL/TLS is enabled

public NetClientOptions
setSslEngineOptions(SSLEngineOptions
the ssl engine to use
sslEngineOptions
)

Overrides io.vertx.core.net.ClientOptionsBase.setSslEngineOptions.

Set to use SSL engine implementation to use.

public NetClientOptions
setSslHandshakeTimeout(long
the SSL handshake timeout to set, in milliseconds
sslHandshakeTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setSslHandshakeTimeout.

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

public NetClientOptions
setSslHandshakeTimeoutUnit(TimeUnit
specify time unit.
sslHandshakeTimeoutUnit
)

Overrides io.vertx.core.net.TCPSSLOptions.setSslHandshakeTimeoutUnit.

Set the SSL handshake timeout unit.

public NetClientOptions
setTcpCork(boolean
the cork value
tcpCork
)

Overrides io.vertx.core.net.ClientOptionsBase.setTcpCork.

Enable the TCP_CORK option - only with linux native transport.

public NetClientOptions
setTcpFastOpen(boolean
the fast open value
tcpFastOpen
)

Overrides io.vertx.core.net.ClientOptionsBase.setTcpFastOpen.

Enable the TCP_FASTOPEN option - only with linux native transport.

public NetClientOptions
setTcpKeepAlive(boolean
true if TCP keep alive is enabled
tcpKeepAlive
)

Overrides io.vertx.core.net.ClientOptionsBase.setTcpKeepAlive.

Set whether TCP keep alive is enabled

public NetClientOptions
setTcpNoDelay(boolean
true if TCP no delay is enabled (Nagle disabled)
tcpNoDelay
)

Overrides io.vertx.core.net.ClientOptionsBase.setTcpNoDelay.

Set whether TCP no delay is enabled

public NetClientOptions
setTcpQuickAck(boolean
the quick ack value
tcpQuickAck
)

Overrides io.vertx.core.net.ClientOptionsBase.setTcpQuickAck.

Enable the TCP_QUICKACK option - only with linux native transport.

public NetClientOptions
setTrafficClass(int
the value of traffic class
trafficClass
)

Overrides io.vertx.core.net.ClientOptionsBase.setTrafficClass.

Set the value of traffic class

public NetClientOptions
setTrustAll(boolean
true if all should be trusted
trustAll
)

Overrides io.vertx.core.net.ClientOptionsBase.setTrustAll.

Set whether all server certificates should be trusted

public NetClientOptions
setTrustOptions(TrustOptions
the trust options
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setTrustOptions.

Set the trust options.

public NetClientOptions
setTrustStoreOptions(JksOptions
the trust options in jks format
options
)

Overrides io.vertx.core.net.ClientOptionsBase.setTrustStoreOptions.

Deprecated

Set the trust options in jks format, aka Java truststore

public NetClientOptions
setUseAlpn(boolean
true when Application-Layer Protocol Negotiation should be used
useAlpn
)

Overrides io.vertx.core.net.ClientOptionsBase.setUseAlpn.

Set the ALPN usage.

public NetClientOptions
setWriteIdleTimeout(int
the write timeout
idleTimeout
)

Overrides io.vertx.core.net.ClientOptionsBase.setWriteIdleTimeout.

Set the write idle timeout, default time unit is seconds.

public JsonObject
toJson()

Overrides io.vertx.core.net.ClientOptionsBase.toJson.

References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Convert to JSON

Inherited from io.vertx.core.net.ClientOptionsBase:
getConnectTimeoutgetLocalAddressgetMetricsNamegetNonProxyHostsgetProxyOptionsisTrustAllsetTcpUserTimeout