public class WebClientOptions extends HttpClientOptions
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_FOLLOW_REDIRECTS
The default value of whether the Web Client should follow redirects = true.
|
static String |
DEFAULT_USER_AGENT
The default user agent string = Vert.x-WebClient/<version>.
|
static boolean |
DEFAULT_USER_AGENT_ENABLED
The default value of whether the Web Client should send a user agent header = true.
|
DEFAULT_ALPN_VERSIONS, DEFAULT_DECODER_INITIAL_BUFFER_SIZE, DEFAULT_DEFAULT_HOST, DEFAULT_DEFAULT_PORT, DEFAULT_FORCE_SNI, DEFAULT_HTTP2_CLEAR_TEXT_UPGRADE, DEFAULT_HTTP2_CONNECTION_WINDOW_SIZE, DEFAULT_HTTP2_KEEP_ALIVE_TIMEOUT, DEFAULT_HTTP2_MAX_POOL_SIZE, DEFAULT_HTTP2_MULTIPLEXING_LIMIT, DEFAULT_KEEP_ALIVE, DEFAULT_KEEP_ALIVE_TIMEOUT, DEFAULT_MAX_CHUNK_SIZE, DEFAULT_MAX_HEADER_SIZE, DEFAULT_MAX_INITIAL_LINE_LENGTH, DEFAULT_MAX_POOL_SIZE, DEFAULT_MAX_REDIRECTS, DEFAULT_MAX_WAIT_QUEUE_SIZE, DEFAULT_MAX_WEBSOCKET_FRAME_SIZE, DEFAULT_MAX_WEBSOCKET_MESSAGE_SIZE, DEFAULT_MAX_WEBSOCKETS, DEFAULT_PIPELINING, DEFAULT_PIPELINING_LIMIT, DEFAULT_POOL_CLEANER_PERIOD, DEFAULT_PROTOCOL_VERSION, DEFAULT_SEND_UNMASKED_FRAMES, DEFAULT_TRACING_POLICY, DEFAULT_TRY_USE_COMPRESSION, DEFAULT_TRY_USE_PER_FRAME_WEBSOCKET_COMPRESSION, DEFAULT_TRY_USE_PER_MESSAGE_WEBSOCKET_COMPRESSION, DEFAULT_VERIFY_HOST, DEFAULT_WEBSOCKET_ALLOW_CLIENT_NO_CONTEXT, DEFAULT_WEBSOCKET_CLOSING_TIMEOUT, DEFAULT_WEBSOCKET_COMPRESSION_LEVEL, DEFAULT_WEBSOCKET_REQUEST_SERVER_NO_CONTEXT
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN
DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
Constructor and Description |
---|
WebClientOptions() |
WebClientOptions(HttpClientOptions other)
Copy constructor using
HttpClientOptions . |
WebClientOptions(JsonObject json)
Creates a new instance from JSON.
|
WebClientOptions(WebClientOptions other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
WebClientOptions |
addCrlPath(String crlPath)
Add a CRL path
|
WebClientOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
WebClientOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite, appended to the ordered suites.
|
WebClientOptions |
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.
|
String |
getUserAgent() |
boolean |
isFollowRedirects() |
boolean |
isUserAgentEnabled() |
static String |
loadUserAgent() |
WebClientOptions |
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.
|
WebClientOptions |
setAlpnVersions(List<HttpVersion> alpnVersions)
Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation.
|
WebClientOptions |
setConnectTimeout(int connectTimeout)
Set the connect timeout
|
WebClientOptions |
setDecoderInitialBufferSize(int decoderInitialBufferSize)
set to
initialBufferSizeHttpDecoder the initial buffer of the HttpDecoder. |
WebClientOptions |
setDefaultHost(String defaultHost)
Set the default host name to be used by this client in requests if none is provided when making the request.
|
WebClientOptions |
setDefaultPort(int defaultPort)
Set the default port to be used by this client in requests if none is provided when making the request.
|
WebClientOptions |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.
|
WebClientOptions |
setFollowRedirects(boolean followRedirects)
Configure the default behavior of the client to follow HTTP
30x redirections. |
WebClientOptions |
setForceSni(boolean 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. |
WebClientOptions |
setHttp2ClearTextUpgrade(boolean 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). |
WebClientOptions |
setHttp2ConnectionWindowSize(int http2ConnectionWindowSize)
Set the default HTTP/2 connection window size.
|
WebClientOptions |
setHttp2KeepAliveTimeout(int keepAliveTimeout)
Set the keep alive timeout for HTTP/2 connections, in seconds.
|
WebClientOptions |
setHttp2MaxPoolSize(int max)
Set the maximum pool size for HTTP/2 connections
|
WebClientOptions |
setHttp2MultiplexingLimit(int 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.
|
WebClientOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.
|
WebClientOptions |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.
|
WebClientOptions |
setInitialSettings(Http2Settings settings)
Set the HTTP/2 connection settings immediately sent by to the server when the client connects.
|
WebClientOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
WebClientOptions |
setKeepAlive(boolean keepAlive)
Set whether keep alive is enabled on the client
|
WebClientOptions |
setKeepAliveTimeout(int keepAliveTimeout)
Set the keep alive timeout for HTTP/1.x, in seconds.
|
WebClientOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
WebClientOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
WebClientOptions |
setLocalAddress(String localAddress)
Set the local interface to bind for network connections.
|
WebClientOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
WebClientOptions |
setMaxChunkSize(int maxChunkSize)
Set the maximum HTTP chunk size
|
WebClientOptions |
setMaxHeaderSize(int maxHeaderSize)
Set the maximum length of all headers for HTTP/1.x .
|
WebClientOptions |
setMaxInitialLineLength(int maxInitialLineLength)
Set the maximum length of the initial line for HTTP/1.x (e.g.
|
WebClientOptions |
setMaxPoolSize(int maxPoolSize)
Set the maximum pool size for connections
|
WebClientOptions |
setMaxRedirects(int maxRedirects)
Set to
maxRedirects the maximum number of redirection a request can follow. |
WebClientOptions |
setMaxWaitQueueSize(int maxWaitQueueSize)
Set the maximum requests allowed in the wait queue, any requests beyond the max size will result in
a ConnectionPoolTooBusyException.
|
WebClientOptions |
setMaxWebSocketFrameSize(int maxWebsocketFrameSize)
Set the max WebSocket frame size
|
WebClientOptions |
setMaxWebSocketMessageSize(int maxWebsocketMessageSize)
Set the max WebSocket message size
|
WebClientOptions |
setMetricsName(String metricsName)
Set the metrics name identifying the reported metrics, useful for grouping metrics
with the same name.
|
WebClientOptions |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
WebClientOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
WebClientOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
WebClientOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
WebClientOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
WebClientOptions |
setPipelining(boolean pipelining)
Set whether pipe-lining is enabled on the client
|
WebClientOptions |
setPipeliningLimit(int limit)
Set the limit of pending requests a pipe-lined HTTP/1 connection can send.
|
WebClientOptions |
setPoolCleanerPeriod(int 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.
|
WebClientOptions |
setProtocolVersion(HttpVersion protocolVersion)
Set the protocol version.
|
WebClientOptions |
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for connections via CONNECT proxy (e.g.
|
WebClientOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
WebClientOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
WebClientOptions |
setReusePort(boolean reusePort)
Set the value of reuse port.
|
WebClientOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
WebClientOptions |
setSendUnmaskedFrames(boolean sendUnmaskedFrames)
Set
true when the client wants to skip frame masking. |
WebClientOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
WebClientOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
WebClientOptions |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
WebClientOptions |
setSslHandshakeTimeout(long sslHandshakeTimeout)
Set the SSL handshake timeout, default time unit is seconds.
|
WebClientOptions |
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Set the SSL handshake timeout unit.
|
WebClientOptions |
setTcpCork(boolean tcpCork)
Enable the
TCP_CORK option - only with linux native transport. |
WebClientOptions |
setTcpFastOpen(boolean tcpFastOpen)
Enable the
TCP_FASTOPEN option - only with linux native transport. |
WebClientOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
WebClientOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
WebClientOptions |
setTcpQuickAck(boolean tcpQuickAck)
Enable the
TCP_QUICKACK option - only with linux native transport. |
WebClientOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
WebClientOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted
|
WebClientOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
WebClientOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
WebClientOptions |
setTryUseCompression(boolean tryUseCompression)
Set whether compression is enabled
|
WebClientOptions |
setTryUsePerFrameWebSocketCompression(boolean offer)
Set whether the client will offer the WebSocket per-frame deflate compression extension.
|
WebClientOptions |
setTryUsePerMessageWebSocketCompression(boolean offer)
Set whether the client will offer the WebSocket per-message deflate compression extension.
|
WebClientOptions |
setUseAlpn(boolean useAlpn)
Set the ALPN usage.
|
WebClientOptions |
setUserAgent(String userAgent)
Sets the Web Client user agent header.
|
WebClientOptions |
setUserAgentEnabled(boolean userAgentEnabled)
Sets whether the Web Client should send a user agent header.
|
WebClientOptions |
setVerifyHost(boolean verifyHost)
Set whether hostname verification is enabled
|
WebClientOptions |
setWebSocketCompressionAllowClientNoContext(boolean offer)
Set whether the
client_no_context_takeover parameter of the WebSocket per-message
deflate compression extension will be offered. |
WebClientOptions |
setWebSocketCompressionLevel(int compressionLevel)
Set the WebSocket deflate compression level.
|
WebClientOptions |
setWebSocketCompressionRequestServerNoContext(boolean offer)
Set whether the
server_no_context_takeover parameter of the WebSocket per-message
deflate compression extension will be offered. |
JsonObject |
toJson()
Convert to JSON
|
addNonProxyHost, getAlpnVersions, getDecoderInitialBufferSize, getDefaultHost, getDefaultPort, getHttp2ConnectionWindowSize, getHttp2KeepAliveTimeout, getHttp2MaxPoolSize, getHttp2MultiplexingLimit, getInitialSettings, getKeepAliveTimeout, getMaxChunkSize, getMaxHeaderSize, getMaxInitialLineLength, getMaxPoolSize, getMaxRedirects, getMaxWaitQueueSize, getMaxWebSocketFrameSize, getMaxWebSocketMessageSize, getMaxWebSockets, getPipeliningLimit, getPoolCleanerPeriod, getProtocolVersion, getTracingPolicy, getTryUsePerMessageWebSocketCompression, getTryWebSocketDeflateFrameCompression, getWebSocketClosingTimeout, getWebSocketCompressionAllowClientNoContext, getWebSocketCompressionLevel, getWebSocketCompressionRequestServerNoContext, isForceSni, isHttp2ClearTextUpgrade, isKeepAlive, isPipelining, isSendUnmaskedFrames, isTryUseCompression, isVerifyHost, setMaxWebSockets, setNonProxyHosts, setTracingPolicy, setWebSocketClosingTimeout
getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAll
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn
getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
public static final boolean DEFAULT_USER_AGENT_ENABLED
public static final String DEFAULT_USER_AGENT
public static final boolean DEFAULT_FOLLOW_REDIRECTS
public WebClientOptions()
public WebClientOptions(WebClientOptions other)
other
- the options to copypublic WebClientOptions(HttpClientOptions other)
HttpClientOptions
.other
- the options to copypublic WebClientOptions(JsonObject json)
json
- the JSON objectpublic JsonObject toJson()
toJson
in class HttpClientOptions
public boolean isUserAgentEnabled()
public WebClientOptions setUserAgentEnabled(boolean userAgentEnabled)
userAgentEnabled
- true to send a user agent header, false otherwisepublic String getUserAgent()
public WebClientOptions setUserAgent(String userAgent)
userAgent
- user agent header valuepublic boolean isFollowRedirects()
30x
redirectionspublic WebClientOptions setFollowRedirects(boolean followRedirects)
30x
redirections.followRedirects
- true when a redirect is followedpublic WebClientOptions setMaxRedirects(int maxRedirects)
HttpClientOptions
maxRedirects
the maximum number of redirection a request can follow.setMaxRedirects
in class HttpClientOptions
maxRedirects
- the maximum number of redirectionpublic WebClientOptions setSendBufferSize(int sendBufferSize)
NetworkOptions
setSendBufferSize
in class HttpClientOptions
sendBufferSize
- the buffers size, in bytespublic WebClientOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptions
setReceiveBufferSize
in class HttpClientOptions
receiveBufferSize
- the buffers size, in bytespublic WebClientOptions setReuseAddress(boolean reuseAddress)
NetworkOptions
setReuseAddress
in class HttpClientOptions
reuseAddress
- the value of reuse addresspublic WebClientOptions setTrafficClass(int trafficClass)
NetworkOptions
setTrafficClass
in class HttpClientOptions
trafficClass
- the value of traffic classpublic WebClientOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptions
setTcpNoDelay
in class HttpClientOptions
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)public WebClientOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptions
setTcpKeepAlive
in class HttpClientOptions
tcpKeepAlive
- true if TCP keep alive is enabledpublic WebClientOptions setSoLinger(int soLinger)
TCPSSLOptions
setSoLinger
in class HttpClientOptions
soLinger
- true if SO_linger is enabledpublic WebClientOptions setIdleTimeout(int idleTimeout)
TCPSSLOptions
TCPSSLOptions.setIdleTimeoutUnit(TimeUnit)
setIdleTimeout
in class HttpClientOptions
idleTimeout
- the timeout, in secondspublic WebClientOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptions
setIdleTimeoutUnit
in class HttpClientOptions
idleTimeoutUnit
- specify time unit.public WebClientOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class HttpClientOptions
ssl
- true if enabledpublic WebClientOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptions
setKeyCertOptions
in class HttpClientOptions
options
- the key store optionspublic WebClientOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptions
setKeyStoreOptions
in class HttpClientOptions
options
- the key store in jks formatpublic WebClientOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptions
setPfxKeyCertOptions
in class HttpClientOptions
options
- the key cert options in pfx formatpublic WebClientOptions setTrustOptions(TrustOptions options)
TCPSSLOptions
setTrustOptions
in class HttpClientOptions
options
- the trust optionspublic WebClientOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptions
setPemKeyCertOptions
in class HttpClientOptions
options
- the options in pem formatpublic WebClientOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptions
setTrustStoreOptions
in class HttpClientOptions
options
- the trust options in jks formatpublic WebClientOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptions
setPfxTrustOptions
in class HttpClientOptions
options
- the trust options in pfx formatpublic WebClientOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptions
setPemTrustOptions
in class HttpClientOptions
options
- the trust options in pem formatpublic WebClientOptions addEnabledCipherSuite(String suite)
TCPSSLOptions
addEnabledCipherSuite
in class HttpClientOptions
suite
- the suiteTCPSSLOptions.getEnabledCipherSuites()
public WebClientOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptions
addCrlPath
in class HttpClientOptions
crlPath
- the pathNullPointerException
public WebClientOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptions
addCrlValue
in class HttpClientOptions
crlValue
- the valueNullPointerException
public WebClientOptions setConnectTimeout(int connectTimeout)
ClientOptionsBase
setConnectTimeout
in class HttpClientOptions
connectTimeout
- connect timeout, in mspublic WebClientOptions setTrustAll(boolean trustAll)
ClientOptionsBase
setTrustAll
in class HttpClientOptions
trustAll
- true if all should be trustedpublic WebClientOptions setMaxPoolSize(int maxPoolSize)
HttpClientOptions
setMaxPoolSize
in class HttpClientOptions
maxPoolSize
- the maximum pool sizepublic WebClientOptions setHttp2MultiplexingLimit(int limit)
HttpClientOptions
-1
means to use the value sent by the server's initial settings.
-1
is the default value.setHttp2MultiplexingLimit
in class HttpClientOptions
limit
- the maximum concurrent for an HTTP/2 connectionpublic WebClientOptions setHttp2MaxPoolSize(int max)
HttpClientOptions
setHttp2MaxPoolSize
in class HttpClientOptions
max
- the maximum pool sizepublic WebClientOptions setHttp2ConnectionWindowSize(int http2ConnectionWindowSize)
HttpClientOptions
Http2Settings.getInitialWindowSize()
, so the connection window size
is greater than for its streams, in order the data throughput.
A value of -1
reuses the initial window size setting.setHttp2ConnectionWindowSize
in class HttpClientOptions
http2ConnectionWindowSize
- the window size applied to the connectionpublic WebClientOptions setKeepAlive(boolean keepAlive)
HttpClientOptions
setKeepAlive
in class HttpClientOptions
keepAlive
- true
if enabledpublic WebClientOptions setPipelining(boolean pipelining)
HttpClientOptions
setPipelining
in class HttpClientOptions
pipelining
- true
if enabledpublic WebClientOptions setPipeliningLimit(int limit)
HttpClientOptions
setPipeliningLimit
in class HttpClientOptions
limit
- the limit of pending requestspublic WebClientOptions setVerifyHost(boolean verifyHost)
HttpClientOptions
setVerifyHost
in class HttpClientOptions
verifyHost
- true
if enabledpublic WebClientOptions setTryUseCompression(boolean tryUseCompression)
HttpClientOptions
setTryUseCompression
in class HttpClientOptions
tryUseCompression
- true
if enabledpublic WebClientOptions setSendUnmaskedFrames(boolean sendUnmaskedFrames)
HttpClientOptions
true
when the client wants to skip frame masking.
You may want to set it true
on server by server WebSocket communication: in this case you are by passing
RFC6455 protocol.
It's false
as default.
setSendUnmaskedFrames
in class HttpClientOptions
sendUnmaskedFrames
- true if enabledpublic WebClientOptions setMaxWebSocketFrameSize(int maxWebsocketFrameSize)
HttpClientOptions
setMaxWebSocketFrameSize
in class HttpClientOptions
maxWebsocketFrameSize
- the max frame size, in bytespublic WebClientOptions setDefaultHost(String defaultHost)
HttpClientOptions
setDefaultHost
in class HttpClientOptions
public WebClientOptions setDefaultPort(int defaultPort)
HttpClientOptions
setDefaultPort
in class HttpClientOptions
public WebClientOptions setMaxChunkSize(int maxChunkSize)
HttpClientOptions
setMaxChunkSize
in class HttpClientOptions
maxChunkSize
- the maximum chunk sizepublic WebClientOptions setProtocolVersion(HttpVersion protocolVersion)
HttpClientOptions
setProtocolVersion
in class HttpClientOptions
protocolVersion
- the protocol versionpublic WebClientOptions setMaxHeaderSize(int maxHeaderSize)
HttpClientOptions
setMaxHeaderSize
in class HttpClientOptions
maxHeaderSize
- the new maximum lengthpublic WebClientOptions setMaxWaitQueueSize(int maxWaitQueueSize)
HttpClientOptions
setMaxWaitQueueSize
in class HttpClientOptions
maxWaitQueueSize
- the maximum number of waiting requestspublic WebClientOptions setUseAlpn(boolean useAlpn)
TCPSSLOptions
setUseAlpn
in class HttpClientOptions
useAlpn
- true when Application-Layer Protocol Negotiation should be usedpublic WebClientOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptions
setSslEngineOptions
in class HttpClientOptions
sslEngineOptions
- the ssl engine to usepublic WebClientOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions
in class HttpClientOptions
public WebClientOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions
in class HttpClientOptions
public WebClientOptions setHttp2ClearTextUpgrade(boolean value)
HttpClientOptions
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).setHttp2ClearTextUpgrade
in class HttpClientOptions
value
- the upgrade valuepublic WebClientOptions setAlpnVersions(List<HttpVersion> alpnVersions)
HttpClientOptions
HttpClientOptions.setProtocolVersion(io.vertx.core.http.HttpVersion)
:
HttpVersion.HTTP_2
: [ "h2", "http/1.1" ]HttpClientOptions.getProtocolVersion()
]setAlpnVersions
in class HttpClientOptions
alpnVersions
- the versionspublic WebClientOptions setMetricsName(String metricsName)
ClientOptionsBase
setMetricsName
in class HttpClientOptions
metricsName
- the metrics namepublic WebClientOptions setProxyOptions(ProxyOptions proxyOptions)
ClientOptionsBase
setProxyOptions
in class HttpClientOptions
proxyOptions
- proxy options objectpublic WebClientOptions setLocalAddress(String localAddress)
ClientOptionsBase
setLocalAddress
in class HttpClientOptions
localAddress
- the local addresspublic WebClientOptions setLogActivity(boolean logEnabled)
NetworkOptions
setLogActivity
in class HttpClientOptions
logEnabled
- true for logging the network activitypublic WebClientOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptions
addEnabledSecureTransportProtocol
in class HttpClientOptions
protocol
- the SSL/TLS protocol to enablepublic WebClientOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptions
removeEnabledSecureTransportProtocol
in class HttpClientOptions
protocol
- the SSL/TLS protocol to disablepublic WebClientOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptions
setEnabledSecureTransportProtocols
in class HttpClientOptions
enabledSecureTransportProtocols
- the SSL/TLS protocols to enablepublic WebClientOptions setReusePort(boolean reusePort)
NetworkOptions
setReusePort
in class HttpClientOptions
reusePort
- the value of reuse portpublic WebClientOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptions
TCP_FASTOPEN
option - only with linux native transport.setTcpFastOpen
in class HttpClientOptions
tcpFastOpen
- the fast open valuepublic WebClientOptions setTcpCork(boolean tcpCork)
TCPSSLOptions
TCP_CORK
option - only with linux native transport.setTcpCork
in class HttpClientOptions
tcpCork
- the cork valuepublic WebClientOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptions
TCP_QUICKACK
option - only with linux native transport.setTcpQuickAck
in class HttpClientOptions
tcpQuickAck
- the quick ack valuepublic WebClientOptions setHttp2KeepAliveTimeout(int keepAliveTimeout)
HttpClientOptions
0
means there is no timeout.setHttp2KeepAliveTimeout
in class HttpClientOptions
keepAliveTimeout
- the timeout, in secondspublic WebClientOptions setForceSni(boolean forceSni)
HttpClientOptions
true
forces the server name to be always sent.setForceSni
in class HttpClientOptions
forceSni
- true
when the client should always use SNI on TLS/SSL connectionspublic WebClientOptions setDecoderInitialBufferSize(int decoderInitialBufferSize)
HttpClientOptions
initialBufferSizeHttpDecoder
the initial buffer of the HttpDecoder.setDecoderInitialBufferSize
in class HttpClientOptions
decoderInitialBufferSize
- the initial buffer sizepublic WebClientOptions setPoolCleanerPeriod(int poolCleanerPeriod)
HttpClientOptions
setPoolCleanerPeriod
in class HttpClientOptions
poolCleanerPeriod
- the pool cleaner periodpublic WebClientOptions setKeepAliveTimeout(int keepAliveTimeout)
HttpClientOptions
0
means there is no timeout.setKeepAliveTimeout
in class HttpClientOptions
keepAliveTimeout
- the timeout, in secondspublic WebClientOptions setMaxWebSocketMessageSize(int maxWebsocketMessageSize)
HttpClientOptions
setMaxWebSocketMessageSize
in class HttpClientOptions
maxWebsocketMessageSize
- the max message size, in bytespublic WebClientOptions setMaxInitialLineLength(int maxInitialLineLength)
HttpClientOptions
"HTTP/1.1 200 OK"
)setMaxInitialLineLength
in class HttpClientOptions
maxInitialLineLength
- the new maximum initial lengthpublic WebClientOptions setInitialSettings(Http2Settings settings)
HttpClientOptions
setInitialSettings
in class HttpClientOptions
settings
- the settings valuepublic WebClientOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptions
setSslHandshakeTimeout
in class HttpClientOptions
sslHandshakeTimeout
- the SSL handshake timeout to set, in millisecondspublic WebClientOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptions
setSslHandshakeTimeoutUnit
in class HttpClientOptions
sslHandshakeTimeoutUnit
- specify time unit.public WebClientOptions setTryUsePerFrameWebSocketCompression(boolean offer)
HttpClientOptions
setTryUsePerFrameWebSocketCompression
in class HttpClientOptions
offer
- true
to offer the per-frame deflate compression extensionpublic WebClientOptions setTryUsePerMessageWebSocketCompression(boolean offer)
HttpClientOptions
setTryUsePerMessageWebSocketCompression
in class HttpClientOptions
offer
- true
to offer the per-message deflate compression extensionpublic WebClientOptions setWebSocketCompressionLevel(int compressionLevel)
HttpClientOptions
setWebSocketCompressionLevel
in class HttpClientOptions
compressionLevel
- the WebSocket deflate compression levelpublic WebClientOptions setWebSocketCompressionAllowClientNoContext(boolean offer)
HttpClientOptions
client_no_context_takeover
parameter of the WebSocket per-message
deflate compression extension will be offered.setWebSocketCompressionAllowClientNoContext
in class HttpClientOptions
offer
- true
to offer the client_no_context_takeover
parameterpublic WebClientOptions setWebSocketCompressionRequestServerNoContext(boolean offer)
HttpClientOptions
server_no_context_takeover
parameter of the WebSocket per-message
deflate compression extension will be offered.setWebSocketCompressionRequestServerNoContext
in class HttpClientOptions
offer
- true
to offer the server_no_context_takeover
parameterpublic static String loadUserAgent()
Copyright © 2021 Eclipse. All rights reserved.