Top Fields Constructors Methods
io.vertx.core.http

public Class WebSocketClientOptions

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, io.vertx.core.net.*, java.util.List, .Objects, .Set, java.util.concurrent.TimeUnit

Field Summary

Modifier and TypeField and Description
private boolean
private int
private int
private String
private int
private int
private int
private int
private String
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
Inherited from io.vertx.core.net.ClientOptionsBase:
DEFAULT_CONNECT_TIMEOUTDEFAULT_METRICS_NAMEDEFAULT_TRUST_ALL

Constructor Summary

AccessConstructor and Description
public
WebSocketClientOptions()

Default constructor

public
WebSocketClientOptions(WebSocketClientOptions
the options to copy
other
)

Copy constructor

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

Constructor to create an options from JSON

Method Summary

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

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

Add a CRL path

public WebSocketClientOptions
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 WebSocketClientOptions
addEnabledCipherSuite(String
the suite
suite
)

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

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

public WebSocketClientOptions
addEnabledSecureTransportProtocol(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 WebSocketClientOptions
public int

Returns:

the amount of time (in seconds) a client WebSocket will wait until it closes TCP connection after receiving a close frame
getClosingTimeout
()

public boolean

Returns:

true when the client_no_context_takeover parameter for the WebSocket per-message deflate compression extension will be offered
getCompressionAllowClientNoContext
()

public int

Returns:

the WebSocket deflate compression level
getCompressionLevel
()

public boolean

Returns:

true when the server_no_context_takeover parameter for the WebSocket per-message deflate compression extension will be offered
getCompressionRequestServerNoContext
()

public String

Returns:

the default host name
getDefaultHost
()

Get the default host name to be used by this client in requests if none is provided when making the request.

public int

Returns:

the default port
getDefaultPort
()

Get the default port to be used by this client in requests if none is provided when making the request.

public int

Returns:

the max number of WebSockets
getMaxConnections
()

Get the maximum of WebSockets per endpoint.

public int

Returns:

the max WebSocket frame size
getMaxFrameSize
()

Get the maximum WebSocket frame size to use

public int

Returns:

the max WebSocket message size
getMaxMessageSize
()

Get the maximum WebSocket message size to use

public String

Returns:

the client name used for sharing
getName
()

public boolean

Returns:

true when the WebSocket per-frame deflate compression extension will be offered
getTryUsePerFrameCompression
()

public boolean

Returns:

true when the WebSocket per-message deflate compression extension will be offered
getTryUsePerMessageCompression
()

private void
public boolean

Returns:

true when frame masking is skipped
isSendUnmaskedFrames
()

public boolean

Returns:

whether the pool is shared
isShared
()

public boolean

Returns:

true if enabled
isVerifyHost
()

Is hostname verification (for SSL/TLS) enabled?

public WebSocketClientOptions
removeEnabledCipherSuite(String
the suite
suite
)

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

Removes an enabled cipher suite from the ordered suites.

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

Returns:

a reference to this, so the API can be used fluently
setClosingTimeout
(int
the timeout is seconds
closingTimeout
)

Set the amount of time a client WebSocket will wait until it closes the TCP connection after receiving a close frame.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setCompressionAllowClientNoContext
(boolean
true to offer the client_no_context_takeover parameter
offer
)

Set whether the client_no_context_takeover parameter of the WebSocket per-message deflate compression extension will be offered.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setCompressionLevel
(int
the WebSocket deflate compression level
compressionLevel
)

Set the WebSocket deflate compression level.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setCompressionRequestServerNoContext
(boolean
true to offer the server_no_context_takeover parameter
offer
)

Set whether the server_no_context_takeover parameter of the WebSocket per-message deflate compression extension will be offered.

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

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

Set the connect timeout

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setDefaultHost
(String defaultHost)

Set the default host name to be used by this client in requests if none is provided when making the request.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setDefaultPort
(int defaultPort)

Set the default port to be used by this client in requests if none is provided when making the request.

public WebSocketClientOptions
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 WebSocketClientOptions
setIdleTimeout(int
the timeout
idleTimeout
)

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

Set the idle timeout, default time unit is seconds.

public WebSocketClientOptions
setIdleTimeoutUnit(TimeUnit
specify time unit.
idleTimeoutUnit
)

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

Set the idle timeout unit.

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

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

Set the key/cert options.

public WebSocketClientOptions
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 WebSocketClientOptions
setLocalAddress(String
the local address
localAddress
)

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

Set the local interface to bind for network connections.

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

Returns:

a reference to this, so the API can be used fluently
setMaxConnections
(int
the max value
maxConnections
)

Set the max number of WebSockets per endpoint.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setMaxFrameSize
(int
the max frame size, in bytes
maxFrameSize
)

Set the max WebSocket frame size

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setMaxMessageSize
(int
the max message size, in bytes
maxMessageSize
)

Set the max WebSocket message size

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

Returns:

a reference to this, so the API can be used fluently
setName
(String
the new name
name
)

Set the client name, used when the client is shared, otherwise ignored.

public WebSocketClientOptions
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 WebSocketClientOptions
public WebSocketClientOptions
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 WebSocketClientOptions
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 WebSocketClientOptions
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 WebSocketClientOptions
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 WebSocketClientOptions
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 WebSocketClientOptions
setReadIdleTimeout(int
the read timeout
idleTimeout
)

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

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

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

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

Set the TCP receive buffer size

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

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

Set the value of reuse address

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

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

Set the value of reuse port.

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

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

Set the TCP send buffer size

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setSendUnmaskedFrames
(boolean
true if enabled
sendUnmaskedFrames
)

Set true when the client wants to skip frame masking.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setShared
(boolean
true to use a shared client
shared
)

Set to true to share the client.

public WebSocketClientOptions
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 WebSocketClientOptions
setSsl(boolean
true if enabled
ssl
)

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

Set whether SSL/TLS is enabled

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

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

Set to use SSL engine implementation to use.

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

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

Set the SSL handshake timeout unit.

public WebSocketClientOptions
setTcpCork(boolean
the cork value
tcpCork
)

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

Enable the TCP_CORK option - only with linux native transport.

public WebSocketClientOptions
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 WebSocketClientOptions
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 WebSocketClientOptions
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 WebSocketClientOptions
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 WebSocketClientOptions
setTcpUserTimeout(int
the tcp user timeout value
tcpUserTimeout
)

Overrides io.vertx.core.net.ClientOptionsBase.setTcpUserTimeout.

Sets the TCP_USER_TIMEOUT option - only with linux native transport.

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

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

Set the value of traffic class

public WebSocketClientOptions
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 WebSocketClientOptions
setTrustOptions(TrustOptions
the trust options
options
)

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

Set the trust options.

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

Returns:

a reference to this, so the API can be used fluently
setTryUsePerFrameCompression
(boolean
true to offer the per-frame deflate compression extension
offer
)

Set whether the client will offer the WebSocket per-frame deflate compression extension.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setTryUsePerMessageCompression
(boolean
true to offer the per-message deflate compression extension
offer
)

Set whether the client will offer the WebSocket per-message deflate compression extension.

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

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

Set the ALPN usage.

public WebSocketClientOptions

Returns:

a reference to this, so the API can be used fluently
setVerifyHost
(boolean
true if enabled
verifyHost
)

Set whether hostname verification is enabled

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

Returns:

the JSON
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:
getConnectTimeoutgetLocalAddressgetMetricsNamegetNonProxyHostsgetProxyOptionsisTrustAllremoveEnabledSecureTransportProtocol