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

public Class HttpClientOptions

extends ClientOptionsBase
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.netty.handler.logging.ByteBufFormat, io.vertx.codegen.annotations.DataObject, .GenIgnore, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.buffer.Buffer, io.vertx.core.impl.Arguments, io.vertx.core.json.JsonObject, io.vertx.core.net.*, io.vertx.core.tracing.TracingPolicy, java.util.*, java.util.concurrent.TimeUnit

Options describing how an HttpClient will make connections.
Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private List<HttpVersion>
private int
private boolean
public static final List<HttpVersion>
DEFAULT_ALPN_VERSIONS

Default Application-Layer Protocol Negotiation versions = [] (automatic according to protocol version)

public static final int
DEFAULT_DECODER_INITIAL_BUFFER_SIZE

Default initial buffer size for HttpObjectDecoder = 128 bytes

public static final boolean
DEFAULT_DECOMPRESSION_SUPPORTED

Whether the client should send requests with an accepting-encoding header set to a compression algorithm by default = false

public static final String
DEFAULT_DEFAULT_HOST

The default value for host name = "localhost"

public static final int
DEFAULT_DEFAULT_PORT

The default value for port = 80

public static final boolean
public static final boolean
DEFAULT_HTTP2_CLEAR_TEXT_UPGRADE

Default using HTTP/1.1 upgrade for establishing an h2C connection = true

public static final boolean
DEFAULT_HTTP2_CLEAR_TEXT_UPGRADE_WITH_PREFLIGHT_REQUEST

Default to use a preflight OPTIONS request for h2C without prior knowledge connection = false

public static final int
DEFAULT_HTTP2_CONNECTION_WINDOW_SIZE

The default connection window size for HTTP/2 = -1

public static final int
DEFAULT_HTTP2_KEEP_ALIVE_TIMEOUT

The default keep alive timeout for HTTP/2 connection can send = 60 seconds

public static final int
DEFAULT_HTTP2_MAX_POOL_SIZE

The default maximum number of connections an HTTP/2 client will pool = 1

public static final int
DEFAULT_HTTP2_MULTIPLEXING_LIMIT

The default maximum number of concurrent streams per connection for HTTP/2 = -1

public static final boolean
DEFAULT_KEEP_ALIVE

Default value of whether keep-alive is enabled = true

public static final int
DEFAULT_KEEP_ALIVE_TIMEOUT

The default keep alive timeout for HTTP/1.1 connection can send = 60 seconds

public static final int
DEFAULT_MAX_CHUNK_SIZE

Default max HTTP chunk size = 8192

public static final int
DEFAULT_MAX_HEADER_SIZE

Default max length of all headers = 8192

public static final int
DEFAULT_MAX_INITIAL_LINE_LENGTH

Default max length of the initial line (e.g. "HTTP/1.1 200 OK") = 4096

public static final int
DEFAULT_MAX_POOL_SIZE

The default maximum number of HTTP/1 connections a client will pool = 5

public static final int
public static final int
DEFAULT_MAX_WAIT_QUEUE_SIZE

Default max wait queue size = -1 (unbounded)

public static final int
DEFAULT_MAX_WEBSOCKET_FRAME_SIZE

The default value for maximum WebSocket frame size = 65536 bytes

public static final int
DEFAULT_MAX_WEBSOCKET_MESSAGE_SIZE

The default value for maximum WebSocket messages (could be assembled from multiple frames) is 4 full frames worth of data

public static final int
DEFAULT_MAX_WEBSOCKETS

The default value for the maximum number of WebSocket = 50

public static final String
DEFAULT_NAME

Actual name of anonymous shared client = __vertx.DEFAULT

public static final boolean
DEFAULT_PIPELINING

Default value of whether pipe-lining is enabled = false

public static final int
DEFAULT_PIPELINING_LIMIT

The default maximum number of requests an HTTP/1.1 pipe-lined connection can send = 10

public static final int
DEFAULT_POOL_CLEANER_PERIOD

Default pool cleaner period = 1000 ms (1 second)

public static final int
DEFAULT_POOL_EVENT_LOOP_SIZE

Default pool event loop size = 0 (reuse current event-loop)

public static final HttpVersion
DEFAULT_PROTOCOL_VERSION

The default protocol version = HTTP/1.1

public static final boolean
DEFAULT_SEND_UNMASKED_FRAMES

Default WebSocket masked bit is true as depicted by RFC = false

public static final boolean
DEFAULT_SHARED

Default shared client = false

public static final TracingPolicy
public static final boolean
DEFAULT_TRY_USE_COMPRESSION

Deprecated as of 4.5, use DEFAULT_DECOMPRESSION_SUPPORTED
Default value of whether the client will attempt to use compression = false
public static final boolean
DEFAULT_TRY_USE_PER_FRAME_WEBSOCKET_COMPRESSION

Default offer WebSocket per-frame deflate compression extension = false

public static final boolean
DEFAULT_TRY_USE_PER_MESSAGE_WEBSOCKET_COMPRESSION

Default offer WebSocket per-message deflate compression extension = false

public static final boolean
DEFAULT_VERIFY_HOST

Default value of whether hostname verification (for SSL/TLS) is enabled = true

public static final boolean
DEFAULT_WEBSOCKET_ALLOW_CLIENT_NO_CONTEXT

Default offering of the server_no_context_takeover WebSocket parameter deflate compression extension = false

public static final int
DEFAULT_WEBSOCKET_CLOSING_TIMEOUT

Default WebSocket closing timeout = 10 second

public static final int
DEFAULT_WEBSOCKET_COMPRESSION_LEVEL

Default WebSocket deflate compression level = 6

public static final boolean
DEFAULT_WEBSOCKET_REQUEST_SERVER_NO_CONTEXT

Default offering of the client_no_context_takeover WebSocket parameter deflate compression extension = false

private String
private int
private boolean
private boolean
private boolean
private int
private int
private int
private Http2Settings
private boolean
private int
private int
private int
private int
private int
private int
private int
private int
private String
private boolean
private int
private PoolOptions
private HttpVersion
private boolean
private boolean
private TracingPolicy
private boolean
private boolean
private boolean
private boolean
private int
private int
private boolean
Inherited from io.vertx.core.net.ClientOptionsBase:
DEFAULT_CONNECT_TIMEOUTDEFAULT_METRICS_NAMEDEFAULT_TRUST_ALL

Constructor Summary

AccessConstructor and Description
public
HttpClientOptions()

Default constructor

public
HttpClientOptions(ClientOptionsBase
the options to copy
other
)

Copy constructor

public
HttpClientOptions(HttpClientOptions
the options to copy
other
)

Copy constructor

public
HttpClientOptions(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 HttpClientOptions
addCrlPath(String
the path
crlPath
)

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

Add a CRL path

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

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

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

public HttpClientOptions
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 HttpClientOptions
addNonProxyHost(String
the added host
nonProxyHost
)

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

Add a host to the getNonProxyHosts() list.

public List<HttpVersion>

Returns:

the list of protocol versions to provide during the Application-Layer Protocol Negotiation. When the list is empty, the client provides a best effort list according to setProtocolVersion
getAlpnVersions
()

public int

Returns:

the initial buffer size for the HTTP decoder
getDecoderInitialBufferSize
()

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 default HTTP/2 connection window size
getHttp2ConnectionWindowSize
()

public int

Returns:

the keep alive timeout value in seconds for HTTP/2 connections
getHttp2KeepAliveTimeout
()

public int

Returns:

the maximum pool size
getHttp2MaxPoolSize
()

Get the maximum pool size for HTTP/2 connections

public int

Returns:

the maximum number of concurrent streams for an HTTP/2 connection, -1 means the value sent by the server
getHttp2MultiplexingLimit
()

public Http2Settings

Returns:

the initial HTTP/2 connection settings
getInitialSettings
()

public int

Returns:

the keep alive timeout value in seconds for HTTP/1.x connections
getKeepAliveTimeout
()

public int

Returns:

the maximum HTTP chunk size
getMaxChunkSize
()

Returns the maximum HTTP chunk size

public int

Returns:

Returns the maximum length of all headers for HTTP/1.x
getMaxHeaderSize
()

public int

Returns:

the maximum length of the initial line for HTTP/1.x (e.g. "GET / HTTP/1.0")
getMaxInitialLineLength
()

public int

Returns:

the maximum pool size
getMaxPoolSize
()

Get the maximum pool size for connections

public int

Returns:

the maximum number of redirection a request can follow
getMaxRedirects
()

public int

Returns:

the maximum wait queue size
getMaxWaitQueueSize
()

Returns the maximum wait queue size

public int

Returns:

the max WebSocket frame size
getMaxWebSocketFrameSize
()

Get the maximum WebSocket frame size to use

public int

Returns:

the max WebSocket message size
getMaxWebSocketMessageSize
()

Get the maximum WebSocket message size to use

public int

Returns:

the max number of WebSockets
getMaxWebSockets
()

Get the maximum of WebSockets per endpoint.

public String

Returns:

the client name used for sharing
getName
()

public int

Returns:

the limit of pending requests a pipe-lined HTTP/1 connection can send
getPipeliningLimit
()

public int

Returns:

the connection pool cleaner period in ms.
getPoolCleanerPeriod
()

public int

Returns:

the max number of event-loop a pool will use, the default value is 0 which implies to reuse the current event-loop
getPoolEventLoopSize
()

public PoolOptions

Returns:

the pool options
getPoolOptions
()

public HttpVersion

Returns:

the protocol version
getProtocolVersion
()

Get the protocol version.

public TracingPolicy

Returns:

the tracing policy
getTracingPolicy
()

public boolean

Returns:

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

public boolean

Returns:

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

public boolean

Returns:

true when the WebSocket per-frame deflate compression extension will be offered
getTryWebSocketDeflateFrameCompression
()
Deprecated instead use tryUsePerFrameWebSocketCompression

public int

Returns:

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

public boolean

Returns:

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

public int

Returns:

the WebSocket deflate compression level
getWebSocketCompressionLevel
()

public boolean

Returns:

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

private void
public boolean

Returns:

true if the client should send requests with an accepting-encoding header set to a compression algorithm, false otherwise
isDecompressionSupported
()

public boolean

Returns:

whether the client should always use SNI on TLS/SSL connections
isForceSni
()

public boolean

Returns:

true when an h2c connection is established using an HTTP/1.1 upgrade request, false when directly
isHttp2ClearTextUpgrade
()

public boolean

Returns:

true when an h2c connection established using an HTTP/1.1 upgrade request should perform a preflight OPTIONS request to the origin server to establish the h2c connection
isHttp2ClearTextUpgradeWithPreflightRequest
()

public boolean

Returns:

true if enabled
isKeepAlive
()

Is keep alive enabled on the client?

public boolean

Returns:

true if pipe-lining is enabled
isPipelining
()

Is pipe-lining enabled on the client

public boolean

Returns:

true when frame masking is skipped
isSendUnmaskedFrames
()

public boolean

Returns:

whether the pool is shared
isShared
()

public boolean
isTryUseCompression()
Deprecated as of 4.5, use isDecompressionSupported instead

Is compression enabled on the client?

public boolean

Returns:

true if enabled
isVerifyHost
()

Is hostname verification (for SSL/TLS) enabled?

public HttpClientOptions
removeEnabledCipherSuite(String
the suite
suite
)

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

Removes an enabled cipher suite from the ordered suites.

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

Returns:

a reference to this, so the API can be used fluently
setAlpnVersions
(List<HttpVersion>
the versions
alpnVersions
)

Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation.

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

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

Set the connect timeout

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setDecoderInitialBufferSize
(int
the initial buffer size
decoderInitialBufferSize
)

set to initialBufferSizeHttpDecoder the initial buffer of the HttpDecoder.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setDecompressionSupported
(boolean
true if the client should send a request with an accepting-encoding header set to a compression algorithm, false otherwise
decompressionSupported
)

Whether the client should send requests with an accepting-encoding header set to a compression algorithm.

public HttpClientOptions

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 HttpClientOptions

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 HttpClientOptions
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 HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setForceSni
(boolean
true when the client should always use SNI on TLS/SSL connections
forceSni
)

By default, the server name is only sent for Fully Qualified Domain Name (FQDN), setting this property to true forces the server name to be always sent.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setHttp2ClearTextUpgrade
(boolean
the upgrade value
value
)

Set to true when an h2c connection is established using an HTTP/1.1 upgrade request, and false when an h2c connection is established directly (with prior knowledge).

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setHttp2ClearTextUpgradeWithPreflightRequest
(boolean
the upgrade value
value
)

Set to true when an h2c connection established using an HTTP/1.1 upgrade request should perform a preflight OPTIONS request to the origin server to establish the h2c connection.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setHttp2ConnectionWindowSize
(int
the window size applied to the connection
http2ConnectionWindowSize
)

Set the default HTTP/2 connection window size.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setHttp2KeepAliveTimeout
(int
the timeout, in seconds
keepAliveTimeout
)

Set the keep alive timeout for HTTP/2 connections, in seconds.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setHttp2MaxPoolSize
(int
the maximum pool size
max
)

Set the maximum pool size for HTTP/2 connections

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setHttp2MultiplexingLimit
(int
the maximum concurrent for an HTTP/2 connection
limit
)

Set a client limit of the number concurrent streams for each HTTP/2 connection, this limits the number of streams the client can create for a connection.

public HttpClientOptions
setIdleTimeout(int
the timeout
idleTimeout
)

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

Set the idle timeout, default time unit is seconds.

public HttpClientOptions
setIdleTimeoutUnit(TimeUnit
specify time unit.
idleTimeoutUnit
)

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

Set the idle timeout unit.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setInitialSettings
(Http2Settings
the settings value
settings
)

Set the HTTP/2 connection settings immediately sent by to the server when the client connects.

public HttpClientOptions
public HttpClientOptions

Returns:

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

Set whether keep alive is enabled on the client

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setKeepAliveTimeout
(int
the timeout, in seconds
keepAliveTimeout
)

Set the keep alive timeout for HTTP/1.x, in seconds.

public HttpClientOptions
setKeyCertOptions(KeyCertOptions
the key store options
options
)

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

Set the key/cert options.

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

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

Set the local interface to bind for network connections.

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

Returns:

a reference to this, so the API can be used fluently
setMaxChunkSize
(int
the maximum chunk size
maxChunkSize
)

Set the maximum HTTP chunk size

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setMaxHeaderSize
(int
the new maximum length
maxHeaderSize
)

Set the maximum length of all headers for HTTP/1.x .

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setMaxInitialLineLength
(int
the new maximum initial length
maxInitialLineLength
)

Set the maximum length of the initial line for HTTP/1.x (e.g. "HTTP/1.1 200 OK")

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setMaxPoolSize
(int
the maximum pool size
maxPoolSize
)

Set the maximum pool size for connections

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setMaxRedirects
(int
the maximum number of redirection
maxRedirects
)

Set to maxRedirects the maximum number of redirection a request can follow.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setMaxWaitQueueSize
(int
the maximum number of waiting requests
maxWaitQueueSize
)

Set the maximum requests allowed in the wait queue, any requests beyond the max size will result in a ConnectionPoolTooBusyException.

public HttpClientOptions

Returns:

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

Set the max WebSocket frame size

public HttpClientOptions

Returns:

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

Set the max WebSocket message size

public HttpClientOptions

Returns:

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

Set the max number of WebSockets per endpoint.

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

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

Returns:

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

Set whether pipe-lining is enabled on the client

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setPipeliningLimit
(int
the limit of pending requests
limit
)

Set the limit of pending requests a pipe-lined HTTP/1 connection can send.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setPoolCleanerPeriod
(int
the pool cleaner period
poolCleanerPeriod
)

Set the connection pool cleaner period in milli seconds, a non positive value disables expiration checks and connections will remain in the pool until they are closed.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setPoolEventLoopSize
(int
the new size
poolEventLoopSize
)

Set the number of event-loop the pool use.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setProtocolVersion
(HttpVersion
the protocol version
protocolVersion
)

Set the protocol version.

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

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

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

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

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

Set the TCP receive buffer size

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

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

Set the value of reuse address

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

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

Set the value of reuse port.

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

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

Set the TCP send buffer size

public HttpClientOptions

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 HttpClientOptions

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

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

Set whether SSL/TLS is enabled

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

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

Set to use SSL engine implementation to use.

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

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

Set the SSL handshake timeout unit.

public HttpClientOptions
setTcpCork(boolean
the cork value
tcpCork
)

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

Enable the TCP_CORK option - only with linux native transport.

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

Returns:

a reference to this, so the API can be used fluently
setTracingPolicy
(TracingPolicy
the tracing policy
tracingPolicy
)

Set the tracing policy for the client behavior when Vert.x has tracing enabled.

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

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

Set the value of traffic class

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

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

Set the trust options.

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

Returns:

a reference to this, so the API can be used fluently
setTryUseCompression
(boolean
true if enabled
tryUseCompression
)
Deprecated as of 4.5, use setDecompressionSupported(boolean) instead

Set whether compression is enabled

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setTryUsePerFrameWebSocketCompression
(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 HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setTryUsePerMessageWebSocketCompression
(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 HttpClientOptions
setUseAlpn(boolean
true when Application-Layer Protocol Negotiation should be used
useAlpn
)

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

Set the ALPN usage.

public HttpClientOptions

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 HttpClientOptions

Returns:

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

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

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setWebSocketCompressionAllowClientNoContext
(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 HttpClientOptions

Returns:

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

Set the WebSocket deflate compression level.

public HttpClientOptions

Returns:

a reference to this, so the API can be used fluently
setWebSocketCompressionRequestServerNoContext
(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 HttpClientOptions
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:
getConnectTimeoutgetLocalAddressgetMetricsNamegetNonProxyHostsgetProxyOptionsisTrustAll