public class WebClientOptions extends HttpClientOptions
| Modifier and Type | Field and Description |
|---|---|
static ExpandOptions |
DEFAULT_EXPAND_OPTIONS |
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_CLEAR_TEXT_UPGRADE_WITH_PREFLIGHT_REQUEST, 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_NAME, DEFAULT_PIPELINING, DEFAULT_PIPELINING_LIMIT, DEFAULT_POOL_CLEANER_PERIOD, DEFAULT_POOL_EVENT_LOOP_SIZE, DEFAULT_PROTOCOL_VERSION, DEFAULT_SEND_UNMASKED_FRAMES, DEFAULT_SHARED, 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_CONTEXTDEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALLDEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, 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_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_WRITE_IDLE_TIMEOUTDEFAULT_LOG_ACTIVITY_FORMAT, 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.
|
WebClientOptions |
addNonProxyHost(String nonProxyHost)
Add a
host to the ClientOptionsBase.getNonProxyHosts() list. |
ExpandOptions |
getTemplateExpandOptions() |
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 |
setMaxWebSockets(int maxWebSockets)
Set the max number of WebSockets per endpoint.
|
WebClientOptions |
setMetricsName(String metricsName)
Set the metrics name identifying the reported metrics, useful for grouping metrics
with the same name.
|
WebClientOptions |
setName(String name)
Set the client name, used when the client is shared, otherwise ignored.
|
WebClientOptions |
setNonProxyHosts(List<String> nonProxyHosts)
Set a list of remote hosts that are not proxied when the client is configured to use a proxy.
|
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 |
setPoolEventLoopSize(int poolEventLoopSize)
Set the number of event-loop the pool use.
|
WebClientOptions |
setProtocolVersion(HttpVersion protocolVersion)
Set the protocol version.
|
WebClientOptions |
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for connections via CONNECT proxy (e.g.
|
WebClientOptions |
setReadIdleTimeout(int idleTimeout)
Set the read idle timeout, default time unit is seconds.
|
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 |
setShared(boolean shared)
Set to
true to share the client. |
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 |
setTemplateExpandOptions(ExpandOptions templateExpandOptions) |
WebClientOptions |
setTracingPolicy(TracingPolicy tracingPolicy)
Set the tracing policy for the client behavior when Vert.x has tracing enabled.
|
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 |
setWebSocketClosingTimeout(int webSocketClosingTimeout)
Set the amount of time a client WebSocket will wait until it closes the TCP connection after receiving a close frame.
|
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. |
WebClientOptions |
setWriteIdleTimeout(int idleTimeout)
Set the write idle timeout, default time unit is seconds.
|
JsonObject |
toJson()
Convert to JSON
|
getAlpnVersions, getDecoderInitialBufferSize, getDefaultHost, getDefaultPort, getHttp2ConnectionWindowSize, getHttp2KeepAliveTimeout, getHttp2MaxPoolSize, getHttp2MultiplexingLimit, getInitialSettings, getKeepAliveTimeout, getMaxChunkSize, getMaxHeaderSize, getMaxInitialLineLength, getMaxPoolSize, getMaxRedirects, getMaxWaitQueueSize, getMaxWebSocketFrameSize, getMaxWebSocketMessageSize, getMaxWebSockets, getName, getPipeliningLimit, getPoolCleanerPeriod, getPoolEventLoopSize, getProtocolVersion, getTracingPolicy, getTryUsePerMessageWebSocketCompression, getTryWebSocketDeflateFrameCompression, getWebSocketClosingTimeout, getWebSocketCompressionAllowClientNoContext, getWebSocketCompressionLevel, getWebSocketCompressionRequestServerNoContext, isForceSni, isHttp2ClearTextUpgrade, isHttp2ClearTextUpgradeWithPreflightRequest, isKeepAlive, isPipelining, isSendUnmaskedFrames, isShared, isTryUseCompression, isVerifyHost, removeEnabledCipherSuite, setActivityLogDataFormat, setHttp2ClearTextUpgradeWithPreflightRequest, setTcpUserTimeoutgetConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAllgetCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpngetActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic static final boolean DEFAULT_USER_AGENT_ENABLED
public static final String DEFAULT_USER_AGENT
public static final boolean DEFAULT_FOLLOW_REDIRECTS
public static final ExpandOptions DEFAULT_EXPAND_OPTIONS
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 HttpClientOptionspublic 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 ExpandOptions getTemplateExpandOptions()
public WebClientOptions setTemplateExpandOptions(ExpandOptions templateExpandOptions)
public WebClientOptions setMaxRedirects(int maxRedirects)
HttpClientOptionsmaxRedirects the maximum number of redirection a request can follow.setMaxRedirects in class HttpClientOptionsmaxRedirects - the maximum number of redirectionpublic WebClientOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class HttpClientOptionssendBufferSize - the buffers size, in bytespublic WebClientOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class HttpClientOptionsreceiveBufferSize - the buffers size, in bytespublic WebClientOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class HttpClientOptionsreuseAddress - the value of reuse addresspublic WebClientOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class HttpClientOptionstrafficClass - the value of traffic classpublic WebClientOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class HttpClientOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public WebClientOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class HttpClientOptionstcpKeepAlive - true if TCP keep alive is enabledpublic WebClientOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class HttpClientOptionssoLinger - true if SO_linger is enabledpublic WebClientOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setIdleTimeout in class HttpClientOptionsidleTimeout - the timeoutpublic WebClientOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptionssetIdleTimeoutUnit in class HttpClientOptionsidleTimeoutUnit - specify time unit.public WebClientOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class HttpClientOptionsssl - true if enabledpublic WebClientOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class HttpClientOptionsoptions - the key store optionspublic WebClientOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class HttpClientOptionsoptions - the key store in jks formatpublic WebClientOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class HttpClientOptionsoptions - the key cert options in pfx formatpublic WebClientOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class HttpClientOptionsoptions - the trust optionspublic WebClientOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class HttpClientOptionsoptions - the options in pem formatpublic WebClientOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class HttpClientOptionsoptions - the trust options in jks formatpublic WebClientOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class HttpClientOptionsoptions - the trust options in pfx formatpublic WebClientOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class HttpClientOptionsoptions - the trust options in pem formatpublic WebClientOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class HttpClientOptionssuite - the suiteTCPSSLOptions.getEnabledCipherSuites()public WebClientOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class HttpClientOptionscrlPath - the pathNullPointerExceptionpublic WebClientOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class HttpClientOptionscrlValue - the valueNullPointerExceptionpublic WebClientOptions setConnectTimeout(int connectTimeout)
ClientOptionsBasesetConnectTimeout in class HttpClientOptionsconnectTimeout - connect timeout, in mspublic WebClientOptions setTrustAll(boolean trustAll)
ClientOptionsBasesetTrustAll in class HttpClientOptionstrustAll - true if all should be trustedpublic WebClientOptions setMaxPoolSize(int maxPoolSize)
HttpClientOptionssetMaxPoolSize in class HttpClientOptionsmaxPoolSize - 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 HttpClientOptionslimit - the maximum concurrent for an HTTP/2 connectionpublic WebClientOptions setHttp2MaxPoolSize(int max)
HttpClientOptionssetHttp2MaxPoolSize in class HttpClientOptionsmax - the maximum pool sizepublic WebClientOptions setHttp2ConnectionWindowSize(int http2ConnectionWindowSize)
HttpClientOptionsHttp2Settings.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 HttpClientOptionshttp2ConnectionWindowSize - the window size applied to the connectionpublic WebClientOptions setKeepAlive(boolean keepAlive)
HttpClientOptionssetKeepAlive in class HttpClientOptionskeepAlive - true if enabledpublic WebClientOptions setPipelining(boolean pipelining)
HttpClientOptionssetPipelining in class HttpClientOptionspipelining - true if enabledpublic WebClientOptions setPipeliningLimit(int limit)
HttpClientOptionssetPipeliningLimit in class HttpClientOptionslimit - the limit of pending requestspublic WebClientOptions setVerifyHost(boolean verifyHost)
HttpClientOptionssetVerifyHost in class HttpClientOptionsverifyHost - true if enabledpublic WebClientOptions setTryUseCompression(boolean tryUseCompression)
HttpClientOptionssetTryUseCompression in class HttpClientOptionstryUseCompression - true if enabledpublic WebClientOptions setSendUnmaskedFrames(boolean sendUnmaskedFrames)
HttpClientOptionstrue 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 HttpClientOptionssendUnmaskedFrames - true if enabledpublic WebClientOptions setMaxWebSocketFrameSize(int maxWebsocketFrameSize)
HttpClientOptionssetMaxWebSocketFrameSize in class HttpClientOptionsmaxWebsocketFrameSize - the max frame size, in bytespublic WebClientOptions setDefaultHost(String defaultHost)
HttpClientOptionssetDefaultHost in class HttpClientOptionspublic WebClientOptions setDefaultPort(int defaultPort)
HttpClientOptionssetDefaultPort in class HttpClientOptionspublic WebClientOptions setMaxChunkSize(int maxChunkSize)
HttpClientOptionssetMaxChunkSize in class HttpClientOptionsmaxChunkSize - the maximum chunk sizepublic WebClientOptions setProtocolVersion(HttpVersion protocolVersion)
HttpClientOptionssetProtocolVersion in class HttpClientOptionsprotocolVersion - the protocol versionpublic WebClientOptions setMaxHeaderSize(int maxHeaderSize)
HttpClientOptionssetMaxHeaderSize in class HttpClientOptionsmaxHeaderSize - the new maximum lengthpublic WebClientOptions setMaxWaitQueueSize(int maxWaitQueueSize)
HttpClientOptionssetMaxWaitQueueSize in class HttpClientOptionsmaxWaitQueueSize - the maximum number of waiting requestspublic WebClientOptions setUseAlpn(boolean useAlpn)
TCPSSLOptionssetUseAlpn in class HttpClientOptionsuseAlpn - true when Application-Layer Protocol Negotiation should be usedpublic WebClientOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class HttpClientOptionssslEngineOptions - the ssl engine to usepublic WebClientOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class HttpClientOptionspublic WebClientOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class HttpClientOptionspublic WebClientOptions setHttp2ClearTextUpgrade(boolean value)
HttpClientOptionstrue 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 HttpClientOptionsvalue - the upgrade valuepublic WebClientOptions setAlpnVersions(List<HttpVersion> alpnVersions)
HttpClientOptionsHttpClientOptions.setProtocolVersion(io.vertx.core.http.HttpVersion):
HttpVersion.HTTP_2: [ "h2", "http/1.1" ]HttpClientOptions.getProtocolVersion()]setAlpnVersions in class HttpClientOptionsalpnVersions - the versionspublic WebClientOptions setMetricsName(String metricsName)
ClientOptionsBasesetMetricsName in class HttpClientOptionsmetricsName - the metrics namepublic WebClientOptions setProxyOptions(ProxyOptions proxyOptions)
ClientOptionsBasesetProxyOptions in class HttpClientOptionsproxyOptions - proxy options objectpublic WebClientOptions setLocalAddress(String localAddress)
ClientOptionsBasesetLocalAddress in class HttpClientOptionslocalAddress - the local addresspublic WebClientOptions setLogActivity(boolean logEnabled)
NetworkOptionssetLogActivity in class HttpClientOptionslogEnabled - true for logging the network activitypublic WebClientOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsaddEnabledSecureTransportProtocol in class HttpClientOptionsprotocol - the SSL/TLS protocol to enablepublic WebClientOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsremoveEnabledSecureTransportProtocol in class HttpClientOptionsprotocol - the SSL/TLS protocol to disablepublic WebClientOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptionssetEnabledSecureTransportProtocols in class HttpClientOptionsenabledSecureTransportProtocols - the SSL/TLS protocols to enablepublic WebClientOptions setReusePort(boolean reusePort)
NetworkOptionssetReusePort in class HttpClientOptionsreusePort - the value of reuse portpublic WebClientOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptionsTCP_FASTOPEN option - only with linux native transport.setTcpFastOpen in class HttpClientOptionstcpFastOpen - the fast open valuepublic WebClientOptions setTcpCork(boolean tcpCork)
TCPSSLOptionsTCP_CORK option - only with linux native transport.setTcpCork in class HttpClientOptionstcpCork - the cork valuepublic WebClientOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptionsTCP_QUICKACK option - only with linux native transport.setTcpQuickAck in class HttpClientOptionstcpQuickAck - the quick ack valuepublic WebClientOptions setHttp2KeepAliveTimeout(int keepAliveTimeout)
HttpClientOptions0 means there is no timeout.setHttp2KeepAliveTimeout in class HttpClientOptionskeepAliveTimeout - the timeout, in secondspublic WebClientOptions setForceSni(boolean forceSni)
HttpClientOptionstrue forces the server name to be always sent.setForceSni in class HttpClientOptionsforceSni - true when the client should always use SNI on TLS/SSL connectionspublic WebClientOptions setDecoderInitialBufferSize(int decoderInitialBufferSize)
HttpClientOptionsinitialBufferSizeHttpDecoder the initial buffer of the HttpDecoder.setDecoderInitialBufferSize in class HttpClientOptionsdecoderInitialBufferSize - the initial buffer sizepublic WebClientOptions setPoolCleanerPeriod(int poolCleanerPeriod)
HttpClientOptionssetPoolCleanerPeriod in class HttpClientOptionspoolCleanerPeriod - the pool cleaner periodpublic WebClientOptions setKeepAliveTimeout(int keepAliveTimeout)
HttpClientOptions0 means there is no timeout.setKeepAliveTimeout in class HttpClientOptionskeepAliveTimeout - the timeout, in secondspublic WebClientOptions setMaxWebSocketMessageSize(int maxWebsocketMessageSize)
HttpClientOptionssetMaxWebSocketMessageSize in class HttpClientOptionsmaxWebsocketMessageSize - the max message size, in bytespublic WebClientOptions setMaxInitialLineLength(int maxInitialLineLength)
HttpClientOptions"HTTP/1.1 200 OK")setMaxInitialLineLength in class HttpClientOptionsmaxInitialLineLength - the new maximum initial lengthpublic WebClientOptions setInitialSettings(Http2Settings settings)
HttpClientOptionssetInitialSettings in class HttpClientOptionssettings - the settings valuepublic WebClientOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptionssetSslHandshakeTimeout in class HttpClientOptionssslHandshakeTimeout - the SSL handshake timeout to set, in millisecondspublic WebClientOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptionssetSslHandshakeTimeoutUnit in class HttpClientOptionssslHandshakeTimeoutUnit - specify time unit.public WebClientOptions setTryUsePerFrameWebSocketCompression(boolean offer)
HttpClientOptionssetTryUsePerFrameWebSocketCompression in class HttpClientOptionsoffer - true to offer the per-frame deflate compression extensionpublic WebClientOptions setTryUsePerMessageWebSocketCompression(boolean offer)
HttpClientOptionssetTryUsePerMessageWebSocketCompression in class HttpClientOptionsoffer - true to offer the per-message deflate compression extensionpublic WebClientOptions setWebSocketCompressionLevel(int compressionLevel)
HttpClientOptionssetWebSocketCompressionLevel in class HttpClientOptionscompressionLevel - the WebSocket deflate compression levelpublic WebClientOptions setWebSocketCompressionAllowClientNoContext(boolean offer)
HttpClientOptionsclient_no_context_takeover parameter of the WebSocket per-message
deflate compression extension will be offered.setWebSocketCompressionAllowClientNoContext in class HttpClientOptionsoffer - true to offer the client_no_context_takeover parameterpublic WebClientOptions setWebSocketCompressionRequestServerNoContext(boolean offer)
HttpClientOptionsserver_no_context_takeover parameter of the WebSocket per-message
deflate compression extension will be offered.setWebSocketCompressionRequestServerNoContext in class HttpClientOptionsoffer - true to offer the server_no_context_takeover parameterpublic WebClientOptions setReadIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setReadIdleTimeout in class HttpClientOptionsidleTimeout - the read timeoutpublic WebClientOptions setWriteIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setWriteIdleTimeout in class HttpClientOptionsidleTimeout - the write timeoutpublic WebClientOptions setMaxWebSockets(int maxWebSockets)
HttpClientOptionssetMaxWebSockets in class HttpClientOptionsmaxWebSockets - the max valuepublic WebClientOptions setNonProxyHosts(List<String> nonProxyHosts)
ClientOptionsBasenonProxyHosts configuration.
Entries can use the * wildcard character for pattern matching, e.g *.example.com matches www.example.com.
setNonProxyHosts in class HttpClientOptionsnonProxyHosts - the list of non proxies hostspublic WebClientOptions addNonProxyHost(String nonProxyHost)
ClientOptionsBasehost to the ClientOptionsBase.getNonProxyHosts() list.addNonProxyHost in class HttpClientOptionsnonProxyHost - the added hostpublic WebClientOptions setWebSocketClosingTimeout(int webSocketClosingTimeout)
HttpClientOptionsWhen a WebSocket is closed, the server should close the TCP connection. This timeout will close the TCP connection on the client when it expires.
Set to 0L closes the TCP connection immediately after receiving the close frame.
Set to a negative value to disable it.
setWebSocketClosingTimeout in class HttpClientOptionswebSocketClosingTimeout - the timeout is secondspublic WebClientOptions setTracingPolicy(TracingPolicy tracingPolicy)
HttpClientOptionssetTracingPolicy in class HttpClientOptionstracingPolicy - the tracing policypublic WebClientOptions setPoolEventLoopSize(int poolEventLoopSize)
HttpClientOptions0, the client pool will use the current event-loop0.setPoolEventLoopSize in class HttpClientOptionspoolEventLoopSize - the new sizepublic WebClientOptions setShared(boolean shared)
HttpClientOptionstrue to share the client.
There can be multiple shared clients distinguished by HttpClientOptions.getName(), when no specific
name is set, the HttpClientOptions.DEFAULT_NAME is used.
setShared in class HttpClientOptionsshared - true to use a shared clientpublic WebClientOptions setName(String name)
HttpClientOptionssetName in class HttpClientOptionsname - the new namepublic static String loadUserAgent()
Copyright © 2024 Eclipse. All rights reserved.