Class HttpServerProperties


  • @ConfigurationProperties(prefix="vertx.http.server")
    public class HttpServerProperties
    extends Object
    Spring Boot properties integration for HttpServerOptions. All expect the following properties are integrated: usePooledBuffers (deprecated), crlPaths, crlValues, keyCertOptions, trustOptions, sslEngineOptions.

    If sslEngineOptions, crlPath or crlValues are required, please use HttpServerOptionsCustomizer. If keyCertOptions or trustOptions either use HttpServerOptionsCustomizer or ServerProperties.

    • Constructor Detail

      • HttpServerProperties

        public HttpServerProperties()
    • Method Detail

      • getHttpServerOptions

        public io.vertx.core.http.HttpServerOptions getHttpServerOptions()
      • getPort

        public int getPort()
        Returns:
        the port
        See Also:
        NetServerOptions.getPort()
      • setPort

        public void setPort​(int port)
      • getHost

        public String getHost()
        Returns:
        the host
        See Also:
        NetServerOptions.getHost()
      • setHost

        public void setHost​(String host)
      • getAcceptBacklog

        public int getAcceptBacklog()
        Returns:
        the value of accept backlog
        See Also:
        NetServerOptions.getAcceptBacklog()
      • setAcceptBacklog

        public void setAcceptBacklog​(int acceptBacklog)
      • getClientAuth

        public io.vertx.core.http.ClientAuth getClientAuth()
        One of "NONE, REQUEST, REQUIRED". If it's set to "REQUIRED" then server will require the SSL cert to be presented otherwise it won't accept the request. If it's set to "REQUEST" then it won't mandate the certificate to be presented, basically make it optional.
        Returns:
        client auth value
        See Also:
        NetServerOptions.getClientAuth()
      • setClientAuth

        public void setClientAuth​(io.vertx.core.http.ClientAuth clientAuth)
      • isSni

        public boolean isSni()
        Returns:
        whether the server supports Server Name Indication
        See Also:
        NetServerOptions.isSni()
      • setSni

        public void setSni​(boolean sni)
      • isCompressionSupported

        public boolean isCompressionSupported()
        Returns:
        true if the server supports gzip/deflate compression
        See Also:
        HttpServerOptions.isCompressionSupported()
      • setCompressionSupported

        public void setCompressionSupported​(boolean compressionSupported)
      • getCompressionLevel

        public int getCompressionLevel()
        Returns:
        the server gzip/deflate 'compression level' to be used in responses when client and server support is turned on
        See Also:
        HttpServerOptions.getCompressionLevel()
      • setCompressionLevel

        public void setCompressionLevel​(int compressionLevel)
      • isAcceptUnmaskedFrames

        public boolean isAcceptUnmaskedFrames()
        Returns:
        whether server accepts unmasked frames
        See Also:
        HttpServerOptions.isAcceptUnmaskedFrames()
      • setAcceptUnmaskedFrames

        public void setAcceptUnmaskedFrames​(boolean acceptUnmaskedFrames)
      • getMaxWebsocketFrameSize

        @Deprecated
        public int getMaxWebsocketFrameSize()
        Returns:
        the maximum WebSocket frame size
        See Also:
        HttpServerOptions.getMaxWebSocketFrameSize()
      • getMaxWebSocketFrameSize

        public int getMaxWebSocketFrameSize()
        Returns:
        the maximum WebSocket frame size
        See Also:
        HttpServerOptions.getMaxWebSocketFrameSize()
      • setMaxWebsocketFrameSize

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

        public void setMaxWebSocketFrameSize​(int maxWebSocketFrameSize)
      • getMaxWebsocketMessageSize

        @Deprecated
        public int getMaxWebsocketMessageSize()
        Returns:
        the maximum WebSocket message size
        See Also:
        HttpServerOptions.getMaxWebSocketMessageSize()
      • getMaxWebSocketMessageSize

        public int getMaxWebSocketMessageSize()
        Returns:
        the maximum WebSocket message size
        See Also:
        HttpServerOptions.getMaxWebSocketMessageSize()
      • setMaxWebsocketMessageSize

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

        public void setMaxWebSocketMessageSize​(int maxWebSocketMessageSize)
      • getWebSocketSubProtocols

        public List<String> getWebSocketSubProtocols()
        Returns:
        Get the WebSocket sub-protocols
        See Also:
        HttpServerOptions.getWebSocketSubProtocols()
      • setWebSocketSubProtocols

        public void setWebSocketSubProtocols​(List<String> subProtocols)
      • isHandle100ContinueAutomatically

        public boolean isHandle100ContinueAutomatically()
        Returns:
        whether 100 Continue should be handled automatically
        See Also:
        HttpServerOptions.isHandle100ContinueAutomatically()
      • setHandle100ContinueAutomatically

        public void setHandle100ContinueAutomatically​(boolean handle100ContinueAutomatically)
      • getMaxChunkSize

        public int getMaxChunkSize()
        Returns:
        the maximum HTTP chunk size
        See Also:
        HttpServerOptions.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:
        HttpServerOptions.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:
        HttpServerOptions.getMaxHeaderSize()
      • setMaxHeaderSize

        public void setMaxHeaderSize​(int maxHeaderSize)
      • getAlpnVersions

        public List<io.vertx.core.http.HttpVersion> getAlpnVersions()
        Returns:
        the list of protocol versions to provide during the Application-Layer Protocol Negotiatiation
        See Also:
        HttpServerOptions.getAlpnVersions()
      • setAlpnVersions

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

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

        public void setHttp2ConnectionWindowSize​(int http2ConnectionWindowSize)
      • isDecompressionSupported

        public boolean isDecompressionSupported()
        Returns:
        true if the server supports decompression
        See Also:
        HttpServerOptions.isDecompressionSupported()
      • setDecompressionSupported

        public void setDecompressionSupported​(boolean decompressionSupported)
      • getDecoderInitialBufferSize

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

        public void setDecoderInitialBufferSize​(int decoderInitialBufferSize)
      • isPerFrameWebsocketCompressionSupported

        @Deprecated
        public boolean isPerFrameWebsocketCompressionSupported()
        Get whether WebSocket the per-frame deflate compression extension is supported.
        Returns:
        true if the http server will accept the per-frame deflate compression extension
        See Also:
        HttpServerOptions.getPerFrameWebSocketCompressionSupported()
      • isPerFrameWebSocketCompressionSupported

        public boolean isPerFrameWebSocketCompressionSupported()
        Get whether WebSocket the per-frame deflate compression extension is supported.
        Returns:
        true if the http server will accept the per-frame deflate compression extension
        See Also:
        HttpServerOptions.getPerFrameWebSocketCompressionSupported()
      • setPerFrameWebsocketCompressionSupported

        @Deprecated
        public void setPerFrameWebsocketCompressionSupported​(boolean perFrameWebSocketCompressionSupported)
        Deprecated.
      • setPerFrameWebSocketCompressionSupported

        public void setPerFrameWebSocketCompressionSupported​(boolean perFrameWebSocketCompressionSupported)
      • isPerMessageWebsocketCompressionSupported

        @Deprecated
        public boolean isPerMessageWebsocketCompressionSupported()
        Get whether WebSocket per-message deflate compression extension is supported.
        Returns:
        true if the http server will accept the per-message deflate compression extension
        See Also:
        HttpServerOptions.getPerMessageWebSocketCompressionSupported()
      • isPerMessageWebSocketCompressionSupported

        public boolean isPerMessageWebSocketCompressionSupported()
        Get whether WebSocket per-message deflate compression extension is supported.
        Returns:
        true if the http server will accept the per-message deflate compression extension
        See Also:
        HttpServerOptions.getPerMessageWebSocketCompressionSupported()
      • setPerMessageWebsocketCompressionSupported

        @Deprecated
        public void setPerMessageWebsocketCompressionSupported​(boolean perMessageWebSocketCompressionSupported)
        Deprecated.
      • setPerMessageWebSocketCompressionSupported

        public void setPerMessageWebSocketCompressionSupported​(boolean perMessageWebSocketCompressionSupported)
      • getWebsocketCompressionLevel

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

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

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

        public void setWebSocketCompressionLevel​(int webSocketCompressionLevel)
      • isWebsocketAllowServerNoContext

        @Deprecated
        public boolean isWebsocketAllowServerNoContext()
        Returns:
        true when the WebSocket server will accept the server_no_context_takeover parameter for the per-message deflate compression extension offered by the client
        See Also:
        HttpServerOptions.getWebSocketAllowServerNoContext()
      • isWebSocketAllowServerNoContext

        public boolean isWebSocketAllowServerNoContext()
        Returns:
        true when the WebSocket server will accept the server_no_context_takeover parameter for the per-message deflate compression extension offered by the client
        See Also:
        HttpServerOptions.getWebSocketAllowServerNoContext()
      • setWebsocketAllowServerNoContext

        @Deprecated
        public void setWebsocketAllowServerNoContext​(boolean allowServerNoContext)
        Deprecated.
      • setWebSocketAllowServerNoContext

        public void setWebSocketAllowServerNoContext​(boolean allowServerNoContext)
      • isWebsocketPreferredClientNoContext

        @Deprecated
        public boolean isWebsocketPreferredClientNoContext()
        Returns:
        true when the WebSocket server will accept the client_no_context_takeover parameter for the per-message deflate compression extension offered by the client
        See Also:
        HttpServerOptions.getWebSocketPreferredClientNoContext()
      • isWebSocketPreferredClientNoContext

        public boolean isWebSocketPreferredClientNoContext()
        Returns:
        true when the WebSocket server will accept the client_no_context_takeover parameter for the per-message deflate compression extension offered by the client
        See Also:
        HttpServerOptions.getWebSocketPreferredClientNoContext()
      • setWebsocketPreferredClientNoContext

        @Deprecated
        public void setWebsocketPreferredClientNoContext​(boolean preferredClientNoContext)
        Deprecated.
      • setWebSocketPreferredClientNoContext

        public void setWebSocketPreferredClientNoContext​(boolean preferredClientNoContext)
      • 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)
      • 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:
        wether TCP_FASTOPEN option is enabled
        See Also:
        TCPSSLOptions.isTcpFastOpen()
      • setTcpFastOpen

        public void setTcpFastOpen​(boolean tcpFastOpen)
      • isTcpCork

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

        public void setTcpCork​(boolean tcpCork)
      • isTcpQuickAck

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

        public void setTcpQuickAck​(boolean tcpQuickAck)
      • 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)
      • getTrafficClass

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

        public void setTrafficClass​(int trafficClass)
      • isReuseAddress

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

        public void setReuseAddress​(boolean reuseAddress)
      • getLogActivity

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

        public void setLogActivity​(boolean logActivity)
      • 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)