Class HttpClientProperties


  • @ConfigurationProperties(prefix="vertx.http.client")
    public class HttpClientProperties
    extends Object
    Spring Boot properties integration for HttpClientOptions. All expect the following properties are integrated: crlPaths, crlValues, keyCertOptions, trustOptions, sslEngineOptions, proxyOptions.

    If any of the ignored properties is required, please use HttpClientOptionsCustomizer.

    • Constructor Detail

      • HttpClientProperties

        public HttpClientProperties()
    • Method Detail

      • getHttpClientOptions

        public io.vertx.core.http.HttpClientOptions getHttpClientOptions()
      • getSendBufferSize

        public int getSendBufferSize()
        Return the TCP send buffer size, in bytes.
        Returns:
        the send buffer size
        See Also:
        NetworkOptions.getSendBufferSize()
      • setSendBufferSize

        public void setSendBufferSize​(int sendBufferSize)
      • getReceiveBufferSize

        public int getReceiveBufferSize()
        Return the TCP receive buffer size, in bytes
        Returns:
        the receive buffer size
        See Also:
        NetworkOptions.getReceiveBufferSize()
      • setReceiveBufferSize

        public void setReceiveBufferSize​(int receiveBufferSize)
      • isReuseAddress

        public boolean isReuseAddress()
        Returns:
        the value of reuse address
        See Also:
        NetworkOptions.isReuseAddress()
      • setReuseAddress

        public void setReuseAddress​(boolean reuseAddress)
      • isReusePort

        public boolean isReusePort()
        Returns:
        the value of reuse address - only supported by native transports
        See Also:
        NetworkOptions.isReusePort()
      • setReusePort

        public void setReusePort​(boolean reusePort)
      • getTrafficClass

        public int getTrafficClass()
        Returns:
        the value of traffic class
        See Also:
        NetworkOptions.getTrafficClass()
      • setTrafficClass

        public void setTrafficClass​(int trafficClass)
      • getLogActivity

        public boolean getLogActivity()
        Returns:
        true when network activity logging is enabled
        See Also:
        NetworkOptions.getLogActivity()
      • setLogActivity

        public void setLogActivity​(boolean logEnabled)
      • isTcpNoDelay

        public boolean isTcpNoDelay()
        Returns:
        TCP no delay enabled ?
        See Also:
        TCPSSLOptions.isTcpNoDelay()
      • setTcpNoDelay

        public void setTcpNoDelay​(boolean tcpNoDelay)
      • isTcpKeepAlive

        public boolean isTcpKeepAlive()
        Returns:
        is TCP keep alive enabled?
        See Also:
        TCPSSLOptions.isTcpKeepAlive()
      • setTcpKeepAlive

        public void setTcpKeepAlive​(boolean tcpKeepAlive)
      • getSoLinger

        public int getSoLinger()
        Returns:
        is SO_linger enabled
        See Also:
        TCPSSLOptions.getSoLinger()
      • setSoLinger

        public void setSoLinger​(int soLinger)
      • getIdleTimeout

        public int getIdleTimeout()
        Returns:
        the idle timeout, in time unit specified by getIdleTimeoutUnit().
        See Also:
        TCPSSLOptions.getIdleTimeout()
      • setIdleTimeout

        public void setIdleTimeout​(int idleTimeout)
      • getIdleTimeoutUnit

        public TimeUnit getIdleTimeoutUnit()
        Returns:
        the idle timeout unit.
        See Also:
        TCPSSLOptions.getIdleTimeoutUnit()
      • setIdleTimeoutUnit

        public void setIdleTimeoutUnit​(TimeUnit idleTimeoutUnit)
      • isSsl

        public boolean isSsl()
        Returns:
        is SSL/TLS enabled?
        See Also:
        TCPSSLOptions.isSsl()
      • setSsl

        public void setSsl​(boolean ssl)
      • getEnabledCipherSuites

        public Set<String> getEnabledCipherSuites()
        Returns:
        the enabled cipher suites
        See Also:
        TCPSSLOptions.getEnabledCipherSuites()
      • setEnabledCipherSuites

        public void setEnabledCipherSuites​(Set<String> enabledCipherSuites)
      • isUseAlpn

        public boolean isUseAlpn()
        Returns:
        whether to use or not Application-Layer Protocol Negotiation
        See Also:
        TCPSSLOptions.isUseAlpn()
      • setUseAlpn

        public void setUseAlpn​(boolean useAlpn)
      • getEnabledSecureTransportProtocols

        public Set<String> getEnabledSecureTransportProtocols()
        Returns the enabled SSL/TLS protocols
        Returns:
        the enabled protocols
        See Also:
        TCPSSLOptions.getEnabledSecureTransportProtocols()
      • setEnabledSecureTransportProtocols

        public void setEnabledSecureTransportProtocols​(Set<String> enabledSecureTransportProtocols)
      • isTcpFastOpen

        public boolean isTcpFastOpen()
        Returns:
        whether TCP_FASTOPEN option is enabled
        See Also:
        TCPSSLOptions.isTcpFastOpen()
      • setTcpFastOpen

        public void setTcpFastOpen​(boolean tcpFastOpen)
      • isTcpCork

        public boolean isTcpCork()
        Returns:
        whether TCP_CORK option is enabled
        See Also:
        TCPSSLOptions.isTcpCork()
      • setTcpCork

        public void setTcpCork​(boolean tcpCork)
      • isTcpQuickAck

        public boolean isTcpQuickAck()
        Returns:
        whether TCP_QUICKACK option is enabled
        See Also:
        TCPSSLOptions.isTcpQuickAck()
      • setTcpQuickAck

        public void setTcpQuickAck​(boolean tcpQuickAck)
      • getConnectTimeout

        public int getConnectTimeout()
        Returns:
        the value of connect timeout
        See Also:
        ClientOptionsBase.getConnectTimeout()
      • setConnectTimeout

        public void setConnectTimeout​(int connectTimeout)
      • isTrustAll

        public boolean isTrustAll()
        Returns:
        true if all server certificates should be trusted
        See Also:
        ClientOptionsBase.isTrustAll()
      • setTrustAll

        public void setTrustAll​(boolean trustAll)
      • getMetricsName

        public String getMetricsName()
        Returns:
        the metrics name identifying the reported metrics.
        See Also:
        ClientOptionsBase.getMetricsName()
      • setMetricsName

        public void setMetricsName​(String metricsName)
      • getLocalAddress

        public String getLocalAddress()
        Returns:
        the local interface to bind for network connections.
        See Also:
        ClientOptionsBase.getLocalAddress()
      • setLocalAddress

        public void setLocalAddress​(String localAddress)
      • isVerifyHost

        public boolean isVerifyHost()
        Is hostname verification (for SSL/TLS) enabled?
        Returns:
        true if enabled
        See Also:
        HttpClientOptions.isVerifyHost()
      • setVerifyHost

        public void setVerifyHost​(boolean verifyHost)
      • getMaxPoolSize

        public int getMaxPoolSize()
        Get the maximum pool size for connections
        Returns:
        the maximum pool size
        See Also:
        HttpClientOptions.getMaxPoolSize()
      • setMaxPoolSize

        public void setMaxPoolSize​(int maxPoolSize)
      • isKeepAlive

        public boolean isKeepAlive()
        Is keep alive enabled on the client?
        Returns:
        true if enabled
        See Also:
        HttpClientOptions.isKeepAlive()
      • setKeepAlive

        public void setKeepAlive​(boolean keepAlive)
      • getKeepAliveTimeout

        public int getKeepAliveTimeout()
        Returns:
        the keep alive timeout value in seconds for HTTP/1.x connections
        See Also:
        HttpClientOptions.getKeepAliveTimeout()
      • setKeepAliveTimeout

        public void setKeepAliveTimeout​(int keepAliveTimeout)
      • getPipeliningLimit

        public int getPipeliningLimit()
        Returns:
        the limit of pending requests a pipe-lined HTTP/1 connection can send
        See Also:
        HttpClientOptions.getPipeliningLimit()
      • setPipeliningLimit

        public void setPipeliningLimit​(int limit)
      • isPipelining

        public boolean isPipelining()
        Is pipe-lining enabled on the client
        Returns:
        true if pipe-lining is enabled
        See Also:
        HttpClientOptions.isPipelining()
      • setPipelining

        public void setPipelining​(boolean pipelining)
      • getHttp2MaxPoolSize

        public int getHttp2MaxPoolSize()
        Get the maximum pool size for HTTP/2 connections
        Returns:
        the maximum pool size
        See Also:
        HttpClientOptions.getHttp2MaxPoolSize()
      • setHttp2MaxPoolSize

        public void setHttp2MaxPoolSize​(int max)
      • getHttp2MultiplexingLimit

        public int getHttp2MultiplexingLimit()
        Returns:
        the maximum number of concurrent streams for an HTTP/2 connection, -1 means the value sent by the server
        See Also:
        HttpClientOptions.getHttp2MultiplexingLimit()
      • setHttp2MultiplexingLimit

        public void setHttp2MultiplexingLimit​(int limit)
      • getHttp2ConnectionWindowSize

        public int getHttp2ConnectionWindowSize()
        Returns:
        the default HTTP/2 connection window size
        See Also:
        HttpClientOptions.getHttp2ConnectionWindowSize()
      • setHttp2ConnectionWindowSize

        public void setHttp2ConnectionWindowSize​(int http2ConnectionWindowSize)
      • getHttp2KeepAliveTimeout

        public int getHttp2KeepAliveTimeout()
        Returns:
        the keep alive timeout value in seconds for HTTP/2 connections
        See Also:
        HttpClientOptions.getHttp2KeepAliveTimeout()
      • setHttp2KeepAliveTimeout

        public void setHttp2KeepAliveTimeout​(int keepAliveTimeout)
      • getPoolCleanerPeriod

        public int getPoolCleanerPeriod()
        Returns:
        the connection pool cleaner period in ms.
        See Also:
        HttpClientOptions.getPoolCleanerPeriod()
      • setPoolCleanerPeriod

        public void setPoolCleanerPeriod​(int poolCleanerPeriod)
      • isTryUseCompression

        public boolean isTryUseCompression()
        Is compression enabled on the client?
        Returns:
        true if enabled
        See Also:
        HttpClientOptions.isTryUseCompression()
      • setTryUseCompression

        public void setTryUseCompression​(boolean tryUseCompression)
      • getMaxWebsocketFrameSize

        @Deprecated
        public int getMaxWebsocketFrameSize()
        Get the maximum WebSocket frame size to use
        Returns:
        the max WebSocket frame size
        See Also:
        HttpClientOptions.getMaxWebSocketFrameSize()
      • getMaxWebSocketFrameSize

        public int getMaxWebSocketFrameSize()
        Get the maximum WebSocket frame size to use
        Returns:
        the max WebSocket frame size
        See Also:
        HttpClientOptions.getMaxWebSocketFrameSize()
      • setMaxWebsocketFrameSize

        @Deprecated
        public void setMaxWebsocketFrameSize​(int maxWebSocketFrameSize)
        Deprecated.
      • setMaxWebSocketFrameSize

        public void setMaxWebSocketFrameSize​(int maxWebSocketFrameSize)
      • getMaxWebsocketMessageSize

        @Deprecated
        public int getMaxWebsocketMessageSize()
        Get the maximum WebSocket message size to use
        Returns:
        the max WebSocket message size
        See Also:
        HttpClientOptions.getMaxWebSocketMessageSize()
      • getMaxWebSocketMessageSize

        public int getMaxWebSocketMessageSize()
        Get the maximum WebSocket message size to use
        Returns:
        the max WebSocket message size
        See Also:
        HttpClientOptions.getMaxWebSocketMessageSize()
      • setMaxWebsocketMessageSize

        @Deprecated
        public void setMaxWebsocketMessageSize​(int maxWebSocketMessageSize)
        Deprecated.
      • setMaxWebSocketMessageSize

        public void setMaxWebSocketMessageSize​(int maxWebSocketMessageSize)
      • getDefaultHost

        public String getDefaultHost()
        Get the default host name to be used by this client in requests if none is provided when making the request.
        Returns:
        the default host name
        See Also:
        HttpClientOptions.getDefaultHost()
      • setDefaultHost

        public void setDefaultHost​(String defaultHost)
      • getDefaultPort

        public int getDefaultPort()
        Get the default port to be used by this client in requests if none is provided when making the request.
        Returns:
        the default port
        See Also:
        HttpClientOptions.getDefaultPort()
      • setDefaultPort

        public void setDefaultPort​(int defaultPort)
      • getProtocolVersion

        public io.vertx.core.http.HttpVersion getProtocolVersion()
        Get the protocol version.
        Returns:
        the protocol version
        See Also:
        HttpClientOptions.getProtocolVersion()
      • setProtocolVersion

        public void setProtocolVersion​(io.vertx.core.http.HttpVersion protocolVersion)
      • getMaxChunkSize

        public int getMaxChunkSize()
        Returns the maximum HTTP chunk size
        Returns:
        the maximum HTTP chunk size
        See Also:
        HttpClientOptions.getMaxChunkSize()
      • setMaxChunkSize

        public void setMaxChunkSize​(int maxChunkSize)
      • getMaxInitialLineLength

        public int getMaxInitialLineLength()
        Returns:
        the maximum length of the initial line for HTTP/1.x (e.g. "GET / HTTP/1.0")
        See Also:
        HttpClientOptions.getMaxInitialLineLength()
      • setMaxInitialLineLength

        public void setMaxInitialLineLength​(int maxInitialLineLength)
      • getMaxHeaderSize

        public int getMaxHeaderSize()
        Returns:
        Returns the maximum length of all headers for HTTP/1.x
        See Also:
        HttpClientOptions.getMaxHeaderSize()
      • setMaxHeaderSize

        public void setMaxHeaderSize​(int maxHeaderSize)
      • getMaxWaitQueueSize

        public int getMaxWaitQueueSize()
        Returns the maximum wait queue size
        Returns:
        the maximum wait queue size
        See Also:
        HttpClientOptions.getMaxWaitQueueSize()
      • setMaxWaitQueueSize

        public void setMaxWaitQueueSize​(int maxWaitQueueSize)
      • getHeaderTableSize

        public long getHeaderTableSize()
        Returns:
        the SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting
        See Also:
        Http2Settings.getHeaderTableSize()
      • setHeaderTableSize

        public void setHeaderTableSize​(long headerTableSize)
      • isPushEnabled

        public boolean isPushEnabled()
        Returns:
        the SETTINGS_ENABLE_PUSH HTTP/2 setting
        See Also:
        Http2Settings.isPushEnabled()
      • setPushEnabled

        public void setPushEnabled​(boolean pushEnabled)
      • getMaxConcurrentStreams

        public long getMaxConcurrentStreams()
        Returns:
        the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting
        See Also:
        Http2Settings.getMaxConcurrentStreams()
      • setMaxConcurrentStreams

        public void setMaxConcurrentStreams​(long maxConcurrentStreams)
      • getInitialWindowSize

        public int getInitialWindowSize()
        Returns:
        the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting
        See Also:
        Http2Settings.getInitialWindowSize()
      • setInitialWindowSize

        public void setInitialWindowSize​(int initialWindowSize)
      • getMaxFrameSize

        public int getMaxFrameSize()
        Returns:
        the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting
        See Also:
        Http2Settings.getMaxFrameSize()
      • setMaxFrameSize

        public void setMaxFrameSize​(int maxFrameSize)
      • getMaxHeaderListSize

        public long getMaxHeaderListSize()
        Returns:
        the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting
        See Also:
        Http2Settings.getMaxHeaderListSize()
      • setMaxHeaderListSize

        public void setMaxHeaderListSize​(long maxHeaderListSize)
      • getHttp2ExtraSettings

        public Map<Integer,​Long> getHttp2ExtraSettings()
        Returns:
        the extra settings used for extending HTTP/2
        See Also:
        Http2Settings.getExtraSettings()
      • setHttp2ExtraSettings

        public void setHttp2ExtraSettings​(Map<Integer,​Long> http2ExtraSettings)
      • getAlpnVersions

        public List<io.vertx.core.http.HttpVersion> getAlpnVersions()
        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(io.vertx.core.http.HttpVersion)
        See Also:
        HttpClientOptions.getAlpnVersions()
      • setAlpnVersions

        public void setAlpnVersions​(List<io.vertx.core.http.HttpVersion> alpnVersions)
      • isHttp2ClearTextUpgrade

        public boolean isHttp2ClearTextUpgrade()
        Returns:
        true when an h2c connection is established using an HTTP/1.1 upgrade request, false when directly
        See Also:
        HttpClientOptions.isHttp2ClearTextUpgrade()
      • setHttp2ClearTextUpgrade

        public void setHttp2ClearTextUpgrade​(boolean value)
      • isSendUnmaskedFrames

        public boolean isSendUnmaskedFrames()
        Returns:
        true when frame masking is skipped
        See Also:
        HttpClientOptions.isSendUnmaskedFrames()
      • setSendUnmaskedFrames

        public void setSendUnmaskedFrames​(boolean sendUnmaskedFrames)
      • getMaxRedirects

        public int getMaxRedirects()
        Returns:
        the maximum number of redirection a request can follow
        See Also:
        HttpClientOptions.getMaxRedirects()
      • setMaxRedirects

        public void setMaxRedirects​(int maxRedirects)
      • isForceSni

        public boolean isForceSni()
        Returns:
        whether the client should always use SNI on TLS/SSL connections
        See Also:
        HttpClientOptions.isForceSni()
      • setForceSni

        public void setForceSni​(boolean forceSni)
      • getDecoderInitialBufferSize

        public int getDecoderInitialBufferSize()
        Returns:
        the initial buffer size for the HTTP decoder
        See Also:
        HttpClientOptions.getDecoderInitialBufferSize()
      • setDecoderInitialBufferSize

        public void setDecoderInitialBufferSize​(int decoderInitialBufferSize)
      • isTryWebsocketDeflateFrameCompression

        @Deprecated
        public boolean isTryWebsocketDeflateFrameCompression()
        Returns:
        true when the WebSocket per-frame deflate compression extension will be offered
        See Also:
        HttpClientOptions.getTryWebSocketDeflateFrameCompression()
      • isTryWebSocketDeflateFrameCompression

        public boolean isTryWebSocketDeflateFrameCompression()
        Returns:
        true when the WebSocket per-frame deflate compression extension will be offered
        See Also:
        HttpClientOptions.getTryWebSocketDeflateFrameCompression()
      • setTryUsePerFrameWebsocketCompression

        @Deprecated
        public void setTryUsePerFrameWebsocketCompression​(boolean tryWebSocketDeflateFrameCompression)
        Deprecated.
      • setTryUsePerFrameWebSocketCompression

        public void setTryUsePerFrameWebSocketCompression​(boolean tryWebSocketDeflateFrameCompression)
      • isTryUsePerMessageWebsocketCompression

        @Deprecated
        public boolean isTryUsePerMessageWebsocketCompression()
        Returns:
        true when the WebSocket per-message deflate compression extension will be offered
        See Also:
        HttpClientOptions.getTryUsePerMessageWebSocketCompression()
      • isTryUsePerMessageWebSocketCompression

        public boolean isTryUsePerMessageWebSocketCompression()
        Returns:
        true when the WebSocket per-message deflate compression extension will be offered
        See Also:
        HttpClientOptions.getTryUsePerMessageWebSocketCompression()
      • setTryUsePerMessageWebsocketCompression

        @Deprecated
        public void setTryUsePerMessageWebsocketCompression​(boolean tryUsePerMessageWebSocketCompression)
        Deprecated.
      • setTryUsePerMessageWebSocketCompression

        public void setTryUsePerMessageWebSocketCompression​(boolean tryUsePerMessageWebSocketCompression)
      • getWebsocketCompressionLevel

        @Deprecated
        public int getWebsocketCompressionLevel()
        Returns:
        the WebSocket deflate compression level
        See Also:
        HttpClientOptions.getWebSocketCompressionLevel()
      • getWebSocketCompressionLevel

        public int getWebSocketCompressionLevel()
        Returns:
        the WebSocket deflate compression level
        See Also:
        HttpClientOptions.getWebSocketCompressionLevel()
      • setWebsocketCompressionLevel

        @Deprecated
        public void setWebsocketCompressionLevel​(int webSocketCompressionLevel)
        Deprecated.
      • setWebSocketCompressionLevel

        public void setWebSocketCompressionLevel​(int webSocketCompressionLevel)
      • isWebsocketCompressionAllowClientNoContext

        @Deprecated
        public boolean isWebsocketCompressionAllowClientNoContext()
        Returns:
        true when the client_no_context_takeover parameter for the WebSocket per-message deflate compression extension will be offered
        See Also:
        HttpClientOptions.getWebSocketCompressionAllowClientNoContext()
      • isWebSocketCompressionAllowClientNoContext

        public boolean isWebSocketCompressionAllowClientNoContext()
        Returns:
        true when the client_no_context_takeover parameter for the WebSocket per-message deflate compression extension will be offered
        See Also:
        HttpClientOptions.getWebSocketCompressionAllowClientNoContext()
      • setWebsocketCompressionAllowClientNoContext

        @Deprecated
        public void setWebsocketCompressionAllowClientNoContext​(boolean webSocketCompressionAllowClientNoContext)
        Deprecated.
      • setWebSocketCompressionAllowClientNoContext

        public void setWebSocketCompressionAllowClientNoContext​(boolean webSocketCompressionAllowClientNoContext)
      • isWebsocketCompressionRequestServerNoContext

        @Deprecated
        public boolean isWebsocketCompressionRequestServerNoContext()
        Returns:
        true when the server_no_context_takeover parameter for the WebSocket per-message deflate compression extension will be offered
        See Also:
        HttpClientOptions.getWebSocketCompressionRequestServerNoContext()
      • isWebSocketCompressionRequestServerNoContext

        public boolean isWebSocketCompressionRequestServerNoContext()
        Returns:
        true when the server_no_context_takeover parameter for the WebSocket per-message deflate compression extension will be offered
        See Also:
        HttpClientOptions.getWebSocketCompressionRequestServerNoContext()
      • setWebsocketCompressionRequestServerNoContext

        @Deprecated
        public void setWebsocketCompressionRequestServerNoContext​(boolean webSocketCompressionRequestServerNoContext)
        Deprecated.
      • setWebSocketCompressionRequestServerNoContext

        public void setWebSocketCompressionRequestServerNoContext​(boolean webSocketCompressionRequestServerNoContext)