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

public Class NetServerOptions

extends TCPSSLOptions
Class Inheritance
Known Direct Subclasses
io.vertx.core.http.HttpServerOptions
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.http.ClientAuth, io.vertx.core.json.JsonObject, java.util.Set, java.util.concurrent.TimeUnit

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

Field Summary

Modifier and TypeField and Description
private int
private ClientAuth
public static final int
DEFAULT_ACCEPT_BACKLOG

The default accept backlog = 1024

public static final ClientAuth
DEFAULT_CLIENT_AUTH

Default value of whether client auth is required (SSL/TLS) = No

public static final String
DEFAULT_HOST

The default host to listen on = "0.0.0.0" (meaning listen on all available interfaces).

public static final int
DEFAULT_PORT

The default port to listen on = 0 (meaning a random ephemeral free port will be chosen)

public static final long
DEFAULT_PROXY_PROTOCOL_TIMEOUT

The default value of HA PROXY protocol timeout = 10

public static final TimeUnit
DEFAULT_PROXY_PROTOCOL_TIMEOUT_TIME_UNIT

Default HA PROXY protocol time unit = SECONDS

public static final boolean
DEFAULT_REGISTER_WRITE_HANDLER

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

public static final boolean
DEFAULT_SNI

Default value of whether the server supports SNI = false

public static final boolean
DEFAULT_USE_PROXY_PROTOCOL

Default value of whether the server supports HA PROXY protocol = false

private String
private int
private long
private TimeUnit
private boolean
private boolean
private TrafficShapingOptions
private boolean
Inherited from io.vertx.core.net.TCPSSLOptions:
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLSDEFAULT_IDLE_TIMEOUTDEFAULT_IDLE_TIMEOUT_TIME_UNITDEFAULT_READ_IDLE_TIMEOUTDEFAULT_SO_LINGERDEFAULT_SSLDEFAULT_SSL_ENGINEDEFAULT_SSL_HANDSHAKE_TIMEOUTDEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNITDEFAULT_TCP_CORKDEFAULT_TCP_FAST_OPENDEFAULT_TCP_KEEAPLIVE_INTERVAL_SECONDSDEFAULT_TCP_KEEP_ALIVEDEFAULT_TCP_KEEPALIVE_COUNTDEFAULT_TCP_KEEPALIVE_IDLE_SECONDSDEFAULT_TCP_NO_DELAYDEFAULT_TCP_QUICKACKDEFAULT_TCP_USER_TIMEOUTDEFAULT_USE_ALPNDEFAULT_WRITE_IDLE_TIMEOUT

Constructor Summary

AccessConstructor and Description
public
NetServerOptions()

Default constructor

public
NetServerOptions(NetServerOptions
the options to copy
other
)

Copy constructor

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

Create some options from JSON

Method Summary

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

Overrides io.vertx.core.net.TCPSSLOptions.addCrlPath.

Add a CRL path

public NetServerOptions
addCrlValue(Buffer
the value
crlValue
)

Overrides io.vertx.core.net.TCPSSLOptions.addCrlValue.

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

Add a CRL value

public NetServerOptions
addEnabledCipherSuite(String
the suite
suite
)

Overrides io.vertx.core.net.TCPSSLOptions.addEnabledCipherSuite.

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

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

Overrides io.vertx.core.net.TCPSSLOptions.addEnabledSecureTransportProtocol.

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

public int

Returns:

the value of accept backlog
getAcceptBacklog
()

public ClientAuth
public String

Returns:

the host
getHost
()

public int

Returns:

the port
getPort
()

public long

Returns:

the Proxy protocol timeout, in time unit specified by getProxyProtocolTimeoutUnit().
getProxyProtocolTimeout
()

public TimeUnit

Returns:

the Proxy protocol timeout unit.
getProxyProtocolTimeoutUnit
()

public TrafficShapingOptions

Returns:

traffic shaping options used by Net server.
getTrafficShapingOptions
()

private void
public boolean

Returns:

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

public boolean

Returns:

whether the server supports Server Name Indication
isSni
()

public boolean

Returns:

whether the server uses the HA Proxy protocol
isUseProxyProtocol
()

public NetServerOptions
removeEnabledCipherSuite(String
the suite
suite
)

Overrides io.vertx.core.net.TCPSSLOptions.removeEnabledCipherSuite.

Removes an enabled cipher suite from the ordered suites.

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

Overrides io.vertx.core.net.TCPSSLOptions.removeEnabledSecureTransportProtocol.

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

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setAcceptBacklog
(int
accept backlog
acceptBacklog
)

Set the accept back log

public NetServerOptions
setActivityLogDataFormat(ByteBufFormat
the format to use
activityLogDataFormat
)

Overrides io.vertx.core.net.TCPSSLOptions.setActivityLogDataFormat.

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

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setClientAuth
(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.
clientAuth
)

Set whether client auth is required

public NetServerOptions
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 NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setHost
(String
the host
host
)

Set the host

public NetServerOptions
setIdleTimeout(int
the timeout
idleTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setIdleTimeout.

Set the idle timeout, default time unit is seconds.

public NetServerOptions
setIdleTimeoutUnit(TimeUnit
specify time unit.
idleTimeoutUnit
)

Overrides io.vertx.core.net.TCPSSLOptions.setIdleTimeoutUnit.

Set the idle timeout unit.

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

Overrides io.vertx.core.net.TCPSSLOptions.setKeyCertOptions.

Set the key/cert options.

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

Overrides io.vertx.core.net.TCPSSLOptions.setKeyStoreOptions.

Deprecated

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

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

Overrides io.vertx.core.net.TCPSSLOptions.setLogActivity.

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

public NetServerOptions
public NetServerOptions
setPemKeyCertOptions(PemKeyCertOptions
the options in pem format
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setPemKeyCertOptions.

Deprecated

Set the key/cert store options in pem format.

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

Overrides io.vertx.core.net.TCPSSLOptions.setPemTrustOptions.

Deprecated

Set the trust options in pem format

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

Overrides io.vertx.core.net.TCPSSLOptions.setPfxKeyCertOptions.

Deprecated

Set the key/cert options in pfx format.

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

Overrides io.vertx.core.net.TCPSSLOptions.setPfxTrustOptions.

Deprecated

Set the trust options in pfx format

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setPort
(int
the port
port
)

Set the port

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setProxyProtocolTimeout
(long
the Proxy protocol timeout to set
proxyProtocolTimeout
)

Set the Proxy protocol timeout, default time unit is seconds.

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setProxyProtocolTimeoutUnit
(TimeUnit
specify time unit.
proxyProtocolTimeoutUnit
)

Set the Proxy protocol timeout unit.

public NetServerOptions
setReadIdleTimeout(int
the read timeout
idleTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setReadIdleTimeout.

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

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

Overrides io.vertx.core.net.TCPSSLOptions.setReceiveBufferSize.

Set the TCP receive buffer size

public NetServerOptions

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 NetServerOptions
setReuseAddress(boolean
the value of reuse address
reuseAddress
)

Overrides io.vertx.core.net.TCPSSLOptions.setReuseAddress.

Set the value of reuse address

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

Overrides io.vertx.core.net.TCPSSLOptions.setReusePort.

Set the value of reuse port.

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

Overrides io.vertx.core.net.TCPSSLOptions.setSendBufferSize.

Set the TCP send buffer size

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setSni
(boolean sni)

Set whether the server supports Server Name Indiciation

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

Overrides io.vertx.core.net.TCPSSLOptions.setSoLinger.

Set whether SO_linger keep alive is enabled

public NetServerOptions
setSsl(boolean
true if enabled
ssl
)

Overrides io.vertx.core.net.TCPSSLOptions.setSsl.

Set whether SSL/TLS is enabled

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

Overrides io.vertx.core.net.TCPSSLOptions.setSslEngineOptions.

Set to use SSL engine implementation to use.

public NetServerOptions
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 NetServerOptions
setSslHandshakeTimeoutUnit(TimeUnit
specify time unit.
sslHandshakeTimeoutUnit
)

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

Set the SSL handshake timeout unit.

public NetServerOptions
setTcpCork(boolean
the cork value
tcpCork
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpCork.

Enable the TCP_CORK option - only with linux native transport.

public NetServerOptions
setTcpFastOpen(boolean
the fast open value
tcpFastOpen
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpFastOpen.

Enable the TCP_FASTOPEN option - only with linux native transport.

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

Overrides io.vertx.core.net.TCPSSLOptions.setTcpKeepAlive.

Set whether TCP keep alive is enabled

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

Overrides io.vertx.core.net.TCPSSLOptions.setTcpNoDelay.

Set whether TCP no delay is enabled

public NetServerOptions
setTcpQuickAck(boolean
the quick ack value
tcpQuickAck
)

Overrides io.vertx.core.net.TCPSSLOptions.setTcpQuickAck.

Enable the TCP_QUICKACK option - only with linux native transport.

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

Overrides io.vertx.core.net.TCPSSLOptions.setTrafficClass.

Set the value of traffic class

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setTrafficShapingOptions
(TrafficShapingOptions
options used by traffic handler
trafficShapingOptions
)

Set traffic shaping options.

public NetServerOptions
setTrustOptions(TrustOptions
the trust options
options
)

Overrides io.vertx.core.net.TCPSSLOptions.setTrustOptions.

Set the trust options.

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

Overrides io.vertx.core.net.TCPSSLOptions.setTrustStoreOptions.

Deprecated

Set the trust options in jks format, aka Java truststore

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

Overrides io.vertx.core.net.TCPSSLOptions.setUseAlpn.

Set the ALPN usage.

public NetServerOptions

Returns:

a reference to this, so the API can be used fluently
setUseProxyProtocol
(boolean useProxyProtocol)

Set whether the server uses the HA Proxy protocol

public NetServerOptions
setWriteIdleTimeout(int
the write timeout
idleTimeout
)

Overrides io.vertx.core.net.TCPSSLOptions.setWriteIdleTimeout.

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

public JsonObject

Returns:

the JSON
toJson
()

Overrides io.vertx.core.net.TCPSSLOptions.toJson.

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

Convert to JSON

Inherited from io.vertx.core.net.TCPSSLOptions:
getCrlPathsgetCrlValuesgetEnabledCipherSuitesgetEnabledSecureTransportProtocolsgetIdleTimeoutgetIdleTimeoutUnitgetJdkSslEngineOptionsgetKeyCertOptionsgetKeyStoreOptionsgetOpenSslEngineOptionsgetPemKeyCertOptionsgetPemTrustOptionsgetPfxKeyCertOptionsgetPfxTrustOptionsgetReadIdleTimeoutgetSoLingergetSslEngineOptionsgetSslHandshakeTimeoutgetSslHandshakeTimeoutUnitgetSslOptionsgetTcpKeepAliveCountgetTcpKeepAliveIdleSecondsgetTcpKeepAliveIntervalSecondsgetTcpUserTimeoutgetTrustOptionsgetTrustStoreOptionsgetWriteIdleTimeoutisSslisTcpCorkisTcpFastOpenisTcpKeepAliveisTcpNoDelayisTcpQuickAckisUseAlpnsetTcpKeepAliveCountsetTcpKeepAliveIdleSecondssetTcpKeepAliveIntervalSecondssetTcpUserTimeout