Package io.vertx.tracing.zipkin
Class HttpSenderOptions
- java.lang.Object
-
- io.vertx.core.net.NetworkOptions
-
- io.vertx.core.net.TCPSSLOptions
-
- io.vertx.core.net.ClientOptionsBase
-
- io.vertx.core.http.HttpClientOptions
-
- io.vertx.tracing.zipkin.HttpSenderOptions
-
public class HttpSenderOptions extends HttpClientOptions
Options for reporting to a Zipkin server configured by default tohttp://localhost:9411/api/v2/spans
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SENDER_ENDPOINT
-
Fields inherited from class io.vertx.core.http.HttpClientOptions
DEFAULT_ALPN_VERSIONS, DEFAULT_DECODER_INITIAL_BUFFER_SIZE, DEFAULT_DECOMPRESSION_SUPPORTED, 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_MULTIPLEXING_LIMIT, DEFAULT_KEEP_ALIVE, DEFAULT_KEEP_ALIVE_TIMEOUT, DEFAULT_MAX_CHUNK_SIZE, DEFAULT_MAX_HEADER_SIZE, DEFAULT_MAX_INITIAL_LINE_LENGTH, DEFAULT_MAX_REDIRECTS, DEFAULT_NAME, DEFAULT_PIPELINING, DEFAULT_PIPELINING_LIMIT, DEFAULT_PROTOCOL_VERSION, DEFAULT_SHARED, DEFAULT_TRACING_POLICY, DEFAULT_VERIFY_HOST
-
Fields inherited from class io.vertx.core.net.ClientOptionsBase
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME
-
Fields inherited from class io.vertx.core.net.TCPSSLOptions
DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_WRITE_IDLE_TIMEOUT
-
Fields inherited from class io.vertx.core.net.NetworkOptions
DEFAULT_LOG_ACTIVITY_FORMAT, DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
-
-
Constructor Summary
Constructors Constructor Description HttpSenderOptions()
HttpSenderOptions(JsonObject json)
HttpSenderOptions(HttpSenderOptions other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpSenderOptions
addCrlPath(String crlPath)
Add a CRL pathHttpSenderOptions
addCrlValue(Buffer crlValue)
Add a CRL valueHttpSenderOptions
addEnabledCipherSuite(String suite)
Add an enabled cipher suite, appended to the ordered suites.HttpSenderOptions
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.String
getSenderEndpoint()
HttpSenderOptions
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.HttpSenderOptions
setAlpnVersions(List<HttpVersion> alpnVersions)
Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation.HttpSenderOptions
setConnectTimeout(int connectTimeout)
Set the connect timeoutHttpSenderOptions
setDecoderInitialBufferSize(int decoderInitialBufferSize)
set toinitialBufferSizeHttpDecoder
the initial buffer of the HttpDecoder.HttpSenderOptions
setDecompressionSupported(boolean decompressionSupported)
Whether the client should send requests with anaccepting-encoding
header set to a compression algorithm.HttpSenderOptions
setDefaultHost(String defaultHost)
Set the default host name to be used by this client in requests if none is provided when making the request.HttpSenderOptions
setDefaultPort(int defaultPort)
Set the default port to be used by this client in requests if none is provided when making the request.HttpSenderOptions
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.HttpSenderOptions
setForceSni(boolean forceSni)
By default, the server name is only sent for Fully Qualified Domain Name (FQDN), setting this property totrue
forces the server name to be always sent.HttpSenderOptions
setHttp2ClearTextUpgrade(boolean value)
Set totrue
when an h2c connection is established using an HTTP/1.1 upgrade request, andfalse
when an h2c connection is established directly (with prior knowledge).HttpSenderOptions
setHttp2ConnectionWindowSize(int http2ConnectionWindowSize)
Set the default HTTP/2 connection window size.HttpSenderOptions
setHttp2KeepAliveTimeout(int keepAliveTimeout)
Set the keep alive timeout for HTTP/2 connections, in seconds.HttpSenderOptions
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.HttpSenderOptions
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.HttpSenderOptions
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.HttpSenderOptions
setInitialSettings(Http2Settings settings)
Set the HTTP/2 connection settings immediately sent by to the server when the client connects.HttpSenderOptions
setKeepAlive(boolean keepAlive)
Set whether keep alive is enabled on the clientHttpSenderOptions
setKeepAliveTimeout(int keepAliveTimeout)
Set the keep alive timeout for HTTP/1.x, in seconds.HttpSenderOptions
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.HttpSenderOptions
setLocalAddress(String localAddress)
Set the local interface to bind for network connections.HttpSenderOptions
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.HttpSenderOptions
setMaxChunkSize(int maxChunkSize)
Set the maximum HTTP chunk sizeHttpSenderOptions
setMaxHeaderSize(int maxHeaderSize)
Set the maximum length of all headers for HTTP/1.x .HttpSenderOptions
setMaxInitialLineLength(int maxInitialLineLength)
Set the maximum length of the initial line for HTTP/1.x (e.g.HttpSenderOptions
setMaxRedirects(int maxRedirects)
Set tomaxRedirects
the maximum number of redirection a request can follow.HttpSenderOptions
setMetricsName(String metricsName)
Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.HttpSenderOptions
setPipelining(boolean pipelining)
Set whether pipe-lining is enabled on the clientHttpSenderOptions
setPipeliningLimit(int limit)
Set the limit of pending requests a pipe-lined HTTP/1 connection can send.HttpSenderOptions
setProtocolVersion(HttpVersion protocolVersion)
Set the protocol version.HttpSenderOptions
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for connections via CONNECT proxy (e.g.HttpSenderOptions
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer sizeHttpSenderOptions
setReuseAddress(boolean reuseAddress)
Set the value of reuse addressHttpSenderOptions
setReusePort(boolean reusePort)
Set the value of reuse port.HttpSenderOptions
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer sizeHttpSenderOptions
setSenderEndpoint(String endpoint)
HttpSenderOptions
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabledHttpSenderOptions
setSsl(boolean ssl)
Set whether SSL/TLS is enabledHttpSenderOptions
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.HttpSenderOptions
setTcpCork(boolean tcpCork)
Enable theTCP_CORK
option - only with linux native transport.HttpSenderOptions
setTcpFastOpen(boolean tcpFastOpen)
Enable theTCP_FASTOPEN
option - only with linux native transport.HttpSenderOptions
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabledHttpSenderOptions
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabledHttpSenderOptions
setTcpQuickAck(boolean tcpQuickAck)
Enable theTCP_QUICKACK
option - only with linux native transport.HttpSenderOptions
setTrafficClass(int trafficClass)
Set the value of traffic classHttpSenderOptions
setTrustAll(boolean trustAll)
Set whether all server certificates should be trustedHttpSenderOptions
setTrustOptions(TrustOptions options)
Set the trust options.HttpSenderOptions
setUseAlpn(boolean useAlpn)
Set the ALPN usage.HttpSenderOptions
setVerifyHost(boolean verifyHost)
Set whether hostname verification is enabled-
Methods inherited from class io.vertx.core.http.HttpClientOptions
addNonProxyHost, getAlpnVersions, getDecoderInitialBufferSize, getDefaultHost, getDefaultPort, getHttp2ConnectionWindowSize, getHttp2KeepAliveTimeout, getHttp2MultiplexingLimit, getInitialSettings, getKeepAliveTimeout, getMaxChunkSize, getMaxHeaderSize, getMaxInitialLineLength, getMaxRedirects, getName, getPipeliningLimit, getProtocolVersion, getTracingPolicy, isDecompressionSupported, isForceSni, isHttp2ClearTextUpgrade, isHttp2ClearTextUpgradeWithPreflightRequest, isKeepAlive, isPipelining, isShared, isVerifyHost, removeEnabledCipherSuite, setActivityLogDataFormat, setHttp2ClearTextUpgradeWithPreflightRequest, setName, setNonProxyHosts, setReadIdleTimeout, setShared, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpUserTimeout, setTracingPolicy, setWriteIdleTimeout, toJson
-
Methods inherited from class io.vertx.core.net.ClientOptionsBase
getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getOrCreateSSLOptions, getProxyOptions, getSslOptions, isTrustAll
-
Methods inherited from class io.vertx.core.net.TCPSSLOptions
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getKeyCertOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTcpUserTimeout, getTrustOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn
-
Methods inherited from class io.vertx.core.net.NetworkOptions
getActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
-
-
-
-
Field Detail
-
DEFAULT_SENDER_ENDPOINT
public static final String DEFAULT_SENDER_ENDPOINT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpSenderOptions
public HttpSenderOptions()
-
HttpSenderOptions
public HttpSenderOptions(HttpSenderOptions other)
-
HttpSenderOptions
public HttpSenderOptions(JsonObject json)
-
-
Method Detail
-
getSenderEndpoint
public String getSenderEndpoint()
- Returns:
-
setSenderEndpoint
public HttpSenderOptions setSenderEndpoint(String endpoint)
-
setSendBufferSize
public HttpSenderOptions setSendBufferSize(int sendBufferSize)
Description copied from class:NetworkOptions
Set the TCP send buffer size- Overrides:
setSendBufferSize
in classHttpClientOptions
- Parameters:
sendBufferSize
- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
setReceiveBufferSize
public HttpSenderOptions setReceiveBufferSize(int receiveBufferSize)
Description copied from class:NetworkOptions
Set the TCP receive buffer size- Overrides:
setReceiveBufferSize
in classHttpClientOptions
- Parameters:
receiveBufferSize
- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
setReuseAddress
public HttpSenderOptions setReuseAddress(boolean reuseAddress)
Description copied from class:NetworkOptions
Set the value of reuse address- Overrides:
setReuseAddress
in classHttpClientOptions
- Parameters:
reuseAddress
- the value of reuse address- Returns:
- a reference to this, so the API can be used fluently
-
setReusePort
public HttpSenderOptions setReusePort(boolean reusePort)
Description copied from class:NetworkOptions
Set the value of reuse port. This is only supported by native transports.- Overrides:
setReusePort
in classHttpClientOptions
- Parameters:
reusePort
- the value of reuse port- Returns:
- a reference to this, so the API can be used fluently
-
setTrafficClass
public HttpSenderOptions setTrafficClass(int trafficClass)
Description copied from class:NetworkOptions
Set the value of traffic class- Overrides:
setTrafficClass
in classHttpClientOptions
- Parameters:
trafficClass
- the value of traffic class- Returns:
- a reference to this, so the API can be used fluently
-
setTcpNoDelay
public HttpSenderOptions setTcpNoDelay(boolean tcpNoDelay)
Description copied from class:TCPSSLOptions
Set whether TCP no delay is enabled- Overrides:
setTcpNoDelay
in classHttpClientOptions
- Parameters:
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)- Returns:
- a reference to this, so the API can be used fluently
-
setTcpKeepAlive
public HttpSenderOptions setTcpKeepAlive(boolean tcpKeepAlive)
Description copied from class:TCPSSLOptions
Set whether TCP keep alive is enabled- Overrides:
setTcpKeepAlive
in classHttpClientOptions
- Parameters:
tcpKeepAlive
- true if TCP keep alive is enabled- Returns:
- a reference to this, so the API can be used fluently
-
setSoLinger
public HttpSenderOptions setSoLinger(int soLinger)
Description copied from class:TCPSSLOptions
Set whether SO_linger keep alive is enabled- Overrides:
setSoLinger
in classHttpClientOptions
- Parameters:
soLinger
- true if SO_linger is enabled- Returns:
- a reference to this, so the API can be used fluently
-
setIdleTimeout
public HttpSenderOptions setIdleTimeout(int idleTimeout)
Description copied from class:TCPSSLOptions
Set the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received nor sent within the timeout. If you want change default time unit, useTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)
- Overrides:
setIdleTimeout
in classHttpClientOptions
- Parameters:
idleTimeout
- the timeout- Returns:
- a reference to this, so the API can be used fluently
-
setIdleTimeoutUnit
public HttpSenderOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Description copied from class:TCPSSLOptions
Set the idle timeout unit. If not specified, default is seconds.- Overrides:
setIdleTimeoutUnit
in classHttpClientOptions
- Parameters:
idleTimeoutUnit
- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
-
setSsl
public HttpSenderOptions setSsl(boolean ssl)
Description copied from class:TCPSSLOptions
Set whether SSL/TLS is enabled- Overrides:
setSsl
in classHttpClientOptions
- Parameters:
ssl
- true if enabled- Returns:
- a reference to this, so the API can be used fluently
-
setKeyCertOptions
public HttpSenderOptions setKeyCertOptions(KeyCertOptions options)
Description copied from class:TCPSSLOptions
Set the key/cert options.- Overrides:
setKeyCertOptions
in classHttpClientOptions
- Parameters:
options
- the key store options- Returns:
- a reference to this, so the API can be used fluently
-
setTrustOptions
public HttpSenderOptions setTrustOptions(TrustOptions options)
Description copied from class:TCPSSLOptions
Set the trust options.- Overrides:
setTrustOptions
in classHttpClientOptions
- Parameters:
options
- the trust options- Returns:
- a reference to this, so the API can be used fluently
-
addEnabledCipherSuite
public HttpSenderOptions addEnabledCipherSuite(String suite)
Description copied from class:TCPSSLOptions
Add an enabled cipher suite, appended to the ordered suites.- Overrides:
addEnabledCipherSuite
in classHttpClientOptions
- Parameters:
suite
- the suite- Returns:
- a reference to this, so the API can be used fluently
- See Also:
TCPSSLOptions.getEnabledCipherSuites()
-
addEnabledSecureTransportProtocol
public HttpSenderOptions addEnabledSecureTransportProtocol(String protocol)
Description copied from class:TCPSSLOptions
Add an enabled SSL/TLS protocols, appended to the ordered protocols.- Overrides:
addEnabledSecureTransportProtocol
in classHttpClientOptions
- Parameters:
protocol
- the SSL/TLS protocol to enable- Returns:
- a reference to this, so the API can be used fluently
-
removeEnabledSecureTransportProtocol
public HttpSenderOptions removeEnabledSecureTransportProtocol(String protocol)
Description copied from class:TCPSSLOptions
Removes an enabled SSL/TLS protocol from the ordered protocols.- Overrides:
removeEnabledSecureTransportProtocol
in classHttpClientOptions
- Parameters:
protocol
- the SSL/TLS protocol to disable- Returns:
- a reference to this, so the API can be used fluently
-
setTcpFastOpen
public HttpSenderOptions setTcpFastOpen(boolean tcpFastOpen)
Description copied from class:TCPSSLOptions
Enable theTCP_FASTOPEN
option - only with linux native transport.- Overrides:
setTcpFastOpen
in classHttpClientOptions
- Parameters:
tcpFastOpen
- the fast open value
-
setTcpCork
public HttpSenderOptions setTcpCork(boolean tcpCork)
Description copied from class:TCPSSLOptions
Enable theTCP_CORK
option - only with linux native transport.- Overrides:
setTcpCork
in classHttpClientOptions
- Parameters:
tcpCork
- the cork value
-
setTcpQuickAck
public HttpSenderOptions setTcpQuickAck(boolean tcpQuickAck)
Description copied from class:TCPSSLOptions
Enable theTCP_QUICKACK
option - only with linux native transport.- Overrides:
setTcpQuickAck
in classHttpClientOptions
- Parameters:
tcpQuickAck
- the quick ack value
-
addCrlPath
public HttpSenderOptions addCrlPath(String crlPath) throws NullPointerException
Description copied from class:TCPSSLOptions
Add a CRL path- Overrides:
addCrlPath
in classHttpClientOptions
- Parameters:
crlPath
- the path- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
addCrlValue
public HttpSenderOptions addCrlValue(Buffer crlValue) throws NullPointerException
Description copied from class:TCPSSLOptions
Add a CRL value- Overrides:
addCrlValue
in classHttpClientOptions
- Parameters:
crlValue
- the value- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
setConnectTimeout
public HttpSenderOptions setConnectTimeout(int connectTimeout)
Description copied from class:ClientOptionsBase
Set the connect timeout- Overrides:
setConnectTimeout
in classHttpClientOptions
- Parameters:
connectTimeout
- connect timeout, in ms- Returns:
- a reference to this, so the API can be used fluently
-
setTrustAll
public HttpSenderOptions setTrustAll(boolean trustAll)
Description copied from class:ClientOptionsBase
Set whether all server certificates should be trusted- Overrides:
setTrustAll
in classHttpClientOptions
- Parameters:
trustAll
- true if all should be trusted- Returns:
- a reference to this, so the API can be used fluently
-
setEnabledSecureTransportProtocols
public HttpSenderOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Description copied from class:TCPSSLOptions
Sets the list of enabled SSL/TLS protocols.- Overrides:
setEnabledSecureTransportProtocols
in classHttpClientOptions
- Parameters:
enabledSecureTransportProtocols
- the SSL/TLS protocols to enable- Returns:
- a reference to this, so the API can be used fluently
-
setHttp2MultiplexingLimit
public HttpSenderOptions setHttp2MultiplexingLimit(int limit)
Description copied from class:HttpClientOptions
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. The effective number of streams for a connection is the min of this value and the server's initial settings. Setting the value to-1
means to use the value sent by the server's initial settings.-1
is the default value.- Overrides:
setHttp2MultiplexingLimit
in classHttpClientOptions
- Parameters:
limit
- the maximum concurrent for an HTTP/2 connection- Returns:
- a reference to this, so the API can be used fluently
-
setHttp2ConnectionWindowSize
public HttpSenderOptions setHttp2ConnectionWindowSize(int http2ConnectionWindowSize)
Description copied from class:HttpClientOptions
Set the default HTTP/2 connection window size. It overrides the initial window size set byHttp2Settings.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.- Overrides:
setHttp2ConnectionWindowSize
in classHttpClientOptions
- Parameters:
http2ConnectionWindowSize
- the window size applied to the connection- Returns:
- a reference to this, so the API can be used fluently
-
setHttp2KeepAliveTimeout
public HttpSenderOptions setHttp2KeepAliveTimeout(int keepAliveTimeout)
Description copied from class:HttpClientOptions
Set the keep alive timeout for HTTP/2 connections, in seconds. This value determines how long a connection remains unused in the pool before being evicted and closed. A timeout of0
means there is no timeout.- Overrides:
setHttp2KeepAliveTimeout
in classHttpClientOptions
- Parameters:
keepAliveTimeout
- the timeout, in seconds- Returns:
- a reference to this, so the API can be used fluently
-
setKeepAlive
public HttpSenderOptions setKeepAlive(boolean keepAlive)
Description copied from class:HttpClientOptions
Set whether keep alive is enabled on the client- Overrides:
setKeepAlive
in classHttpClientOptions
- Parameters:
keepAlive
-true
if enabled- Returns:
- a reference to this, so the API can be used fluently
-
setKeepAliveTimeout
public HttpSenderOptions setKeepAliveTimeout(int keepAliveTimeout)
Description copied from class:HttpClientOptions
Set the keep alive timeout for HTTP/1.x, in seconds. This value determines how long a connection remains unused in the pool before being evicted and closed. A timeout of0
means there is no timeout.- Overrides:
setKeepAliveTimeout
in classHttpClientOptions
- Parameters:
keepAliveTimeout
- the timeout, in seconds- Returns:
- a reference to this, so the API can be used fluently
-
setPipelining
public HttpSenderOptions setPipelining(boolean pipelining)
Description copied from class:HttpClientOptions
Set whether pipe-lining is enabled on the client- Overrides:
setPipelining
in classHttpClientOptions
- Parameters:
pipelining
-true
if enabled- Returns:
- a reference to this, so the API can be used fluently
-
setPipeliningLimit
public HttpSenderOptions setPipeliningLimit(int limit)
Description copied from class:HttpClientOptions
Set the limit of pending requests a pipe-lined HTTP/1 connection can send.- Overrides:
setPipeliningLimit
in classHttpClientOptions
- Parameters:
limit
- the limit of pending requests- Returns:
- a reference to this, so the API can be used fluently
-
setVerifyHost
public HttpSenderOptions setVerifyHost(boolean verifyHost)
Description copied from class:HttpClientOptions
Set whether hostname verification is enabled- Overrides:
setVerifyHost
in classHttpClientOptions
- Parameters:
verifyHost
-true
if enabled- Returns:
- a reference to this, so the API can be used fluently
-
setDecompressionSupported
public HttpSenderOptions setDecompressionSupported(boolean decompressionSupported)
Description copied from class:HttpClientOptions
Whether the client should send requests with anaccepting-encoding
header set to a compression algorithm.- Overrides:
setDecompressionSupported
in classHttpClientOptions
- Parameters:
decompressionSupported
-true
if the client should send a request with anaccepting-encoding
header set to a compression algorithm,false
otherwise- Returns:
- a reference to this, so the API can be used fluently
-
setDefaultHost
public HttpSenderOptions setDefaultHost(String defaultHost)
Description copied from class:HttpClientOptions
Set the default host name to be used by this client in requests if none is provided when making the request.- Overrides:
setDefaultHost
in classHttpClientOptions
- Returns:
- a reference to this, so the API can be used fluently
-
setDefaultPort
public HttpSenderOptions setDefaultPort(int defaultPort)
Description copied from class:HttpClientOptions
Set the default port to be used by this client in requests if none is provided when making the request.- Overrides:
setDefaultPort
in classHttpClientOptions
- Returns:
- a reference to this, so the API can be used fluently
-
setProtocolVersion
public HttpSenderOptions setProtocolVersion(HttpVersion protocolVersion)
Description copied from class:HttpClientOptions
Set the protocol version.- Overrides:
setProtocolVersion
in classHttpClientOptions
- Parameters:
protocolVersion
- the protocol version- Returns:
- a reference to this, so the API can be used fluently
-
setMaxChunkSize
public HttpSenderOptions setMaxChunkSize(int maxChunkSize)
Description copied from class:HttpClientOptions
Set the maximum HTTP chunk size- Overrides:
setMaxChunkSize
in classHttpClientOptions
- Parameters:
maxChunkSize
- the maximum chunk size- Returns:
- a reference to this, so the API can be used fluently
-
setMaxInitialLineLength
public HttpSenderOptions setMaxInitialLineLength(int maxInitialLineLength)
Description copied from class:HttpClientOptions
Set the maximum length of the initial line for HTTP/1.x (e.g."HTTP/1.1 200 OK"
)- Overrides:
setMaxInitialLineLength
in classHttpClientOptions
- Parameters:
maxInitialLineLength
- the new maximum initial length- Returns:
- a reference to this, so the API can be used fluently
-
setMaxHeaderSize
public HttpSenderOptions setMaxHeaderSize(int maxHeaderSize)
Description copied from class:HttpClientOptions
Set the maximum length of all headers for HTTP/1.x .- Overrides:
setMaxHeaderSize
in classHttpClientOptions
- Parameters:
maxHeaderSize
- the new maximum length- Returns:
- a reference to this, so the API can be used fluently
-
setInitialSettings
public HttpSenderOptions setInitialSettings(Http2Settings settings)
Description copied from class:HttpClientOptions
Set the HTTP/2 connection settings immediately sent by to the server when the client connects.- Overrides:
setInitialSettings
in classHttpClientOptions
- Parameters:
settings
- the settings value- Returns:
- a reference to this, so the API can be used fluently
-
setUseAlpn
public HttpSenderOptions setUseAlpn(boolean useAlpn)
Description copied from class:TCPSSLOptions
Set the ALPN usage.- Overrides:
setUseAlpn
in classHttpClientOptions
- Parameters:
useAlpn
- true when Application-Layer Protocol Negotiation should be used
-
setSslEngineOptions
public HttpSenderOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Description copied from class:TCPSSLOptions
Set to use SSL engine implementation to use.- Overrides:
setSslEngineOptions
in classHttpClientOptions
- Parameters:
sslEngineOptions
- the ssl engine to use- Returns:
- a reference to this, so the API can be used fluently
-
setAlpnVersions
public HttpSenderOptions setAlpnVersions(List<HttpVersion> alpnVersions)
Description copied from class:HttpClientOptions
Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation. When the list is empty, the client provides a best effort list according toHttpClientOptions.setProtocolVersion(io.vertx.core.http.HttpVersion)
:HttpVersion.HTTP_2
: [ "h2", "http/1.1" ]- otherwise: [
HttpClientOptions.getProtocolVersion()
]
- Overrides:
setAlpnVersions
in classHttpClientOptions
- Parameters:
alpnVersions
- the versions- Returns:
- a reference to this, so the API can be used fluently
-
setHttp2ClearTextUpgrade
public HttpSenderOptions setHttp2ClearTextUpgrade(boolean value)
Description copied from class:HttpClientOptions
Set totrue
when an h2c connection is established using an HTTP/1.1 upgrade request, andfalse
when an h2c connection is established directly (with prior knowledge).- Overrides:
setHttp2ClearTextUpgrade
in classHttpClientOptions
- Parameters:
value
- the upgrade value- Returns:
- a reference to this, so the API can be used fluently
-
setMaxRedirects
public HttpSenderOptions setMaxRedirects(int maxRedirects)
Description copied from class:HttpClientOptions
Set tomaxRedirects
the maximum number of redirection a request can follow.- Overrides:
setMaxRedirects
in classHttpClientOptions
- Parameters:
maxRedirects
- the maximum number of redirection- Returns:
- a reference to this, so the API can be used fluently
-
setForceSni
public HttpSenderOptions setForceSni(boolean forceSni)
Description copied from class:HttpClientOptions
By default, the server name is only sent for Fully Qualified Domain Name (FQDN), setting this property totrue
forces the server name to be always sent.- Overrides:
setForceSni
in classHttpClientOptions
- Parameters:
forceSni
-true
when the client should always use SNI on TLS/SSL connections- Returns:
- a reference to this, so the API can be used fluently
-
setMetricsName
public HttpSenderOptions setMetricsName(String metricsName)
Description copied from class:ClientOptionsBase
Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.- Overrides:
setMetricsName
in classHttpClientOptions
- Parameters:
metricsName
- the metrics name- Returns:
- a reference to this, so the API can be used fluently
-
setProxyOptions
public HttpSenderOptions setProxyOptions(ProxyOptions proxyOptions)
Description copied from class:ClientOptionsBase
Set proxy options for connections via CONNECT proxy (e.g. Squid) or a SOCKS proxy.- Overrides:
setProxyOptions
in classHttpClientOptions
- Parameters:
proxyOptions
- proxy options object- Returns:
- a reference to this, so the API can be used fluently
-
setLocalAddress
public HttpSenderOptions setLocalAddress(String localAddress)
Description copied from class:ClientOptionsBase
Set the local interface to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.- Overrides:
setLocalAddress
in classHttpClientOptions
- Parameters:
localAddress
- the local address- Returns:
- a reference to this, so the API can be used fluently
-
setLogActivity
public HttpSenderOptions setLogActivity(boolean logEnabled)
Description copied from class:NetworkOptions
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.- Overrides:
setLogActivity
in classHttpClientOptions
- Parameters:
logEnabled
- true for logging the network activity- Returns:
- a reference to this, so the API can be used fluently
-
setDecoderInitialBufferSize
public HttpSenderOptions setDecoderInitialBufferSize(int decoderInitialBufferSize)
Description copied from class:HttpClientOptions
set toinitialBufferSizeHttpDecoder
the initial buffer of the HttpDecoder.- Overrides:
setDecoderInitialBufferSize
in classHttpClientOptions
- Parameters:
decoderInitialBufferSize
- the initial buffer size- Returns:
- a reference to this, so the API can be used fluently
-
-