Class HttpServerProperties
- java.lang.Object
-
- dev.snowdrop.vertx.http.server.properties.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
HttpServerOptionsCustomizerorServerProperties.
-
-
Constructor Summary
Constructors Constructor Description HttpServerProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetAcceptBacklog()List<io.vertx.core.http.HttpVersion>getAlpnVersions()io.vertx.core.http.ClientAuthgetClientAuth()One of "NONE, REQUEST, REQUIRED".intgetCompressionLevel()intgetDecoderInitialBufferSize()Set<String>getEnabledCipherSuites()Set<String>getEnabledSecureTransportProtocols()Returns the enabled SSL/TLS protocolslonggetHeaderTableSize()StringgetHost()intgetHttp2ConnectionWindowSize()Map<Integer,Long>getHttp2ExtraSettings()io.vertx.core.http.HttpServerOptionsgetHttpServerOptions()intgetIdleTimeout()TimeUnitgetIdleTimeoutUnit()intgetInitialWindowSize()booleangetLogActivity()intgetMaxChunkSize()longgetMaxConcurrentStreams()intgetMaxFrameSize()longgetMaxHeaderListSize()intgetMaxHeaderSize()intgetMaxInitialLineLength()intgetMaxWebsocketFrameSize()Deprecated.intgetMaxWebSocketFrameSize()intgetMaxWebsocketMessageSize()Deprecated.intgetMaxWebSocketMessageSize()intgetPort()intgetReceiveBufferSize()Return the TCP receive buffer size, in bytesintgetSendBufferSize()Return the TCP send buffer size, in bytes.intgetSoLinger()intgetTrafficClass()intgetWebsocketCompressionLevel()Deprecated.intgetWebSocketCompressionLevel()List<String>getWebSocketSubProtocols()booleanisAcceptUnmaskedFrames()booleanisCompressionSupported()booleanisDecompressionSupported()booleanisHandle100ContinueAutomatically()booleanisPerFrameWebsocketCompressionSupported()Deprecated.booleanisPerFrameWebSocketCompressionSupported()Get whether WebSocket the per-frame deflate compression extension is supported.booleanisPerMessageWebsocketCompressionSupported()Deprecated.booleanisPerMessageWebSocketCompressionSupported()Get whether WebSocket per-message deflate compression extension is supported.booleanisPushEnabled()booleanisReuseAddress()booleanisReusePort()booleanisSni()booleanisSsl()booleanisTcpCork()booleanisTcpFastOpen()booleanisTcpKeepAlive()booleanisTcpNoDelay()booleanisTcpQuickAck()booleanisUseAlpn()booleanisWebsocketAllowServerNoContext()Deprecated.booleanisWebSocketAllowServerNoContext()booleanisWebsocketPreferredClientNoContext()Deprecated.booleanisWebSocketPreferredClientNoContext()voidsetAcceptBacklog(int acceptBacklog)voidsetAcceptUnmaskedFrames(boolean acceptUnmaskedFrames)voidsetAlpnVersions(List<io.vertx.core.http.HttpVersion> alpnVersions)voidsetClientAuth(io.vertx.core.http.ClientAuth clientAuth)voidsetCompressionLevel(int compressionLevel)voidsetCompressionSupported(boolean compressionSupported)voidsetDecoderInitialBufferSize(int decoderInitialBufferSize)voidsetDecompressionSupported(boolean decompressionSupported)voidsetEnabledCipherSuites(Set<String> enabledCipherSuites)voidsetEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)voidsetHandle100ContinueAutomatically(boolean handle100ContinueAutomatically)voidsetHeaderTableSize(long headerTableSize)voidsetHost(String host)voidsetHttp2ConnectionWindowSize(int http2ConnectionWindowSize)voidsetHttp2ExtraSettings(Map<Integer,Long> http2ExtraSettings)voidsetIdleTimeout(int idleTimeout)voidsetIdleTimeoutUnit(TimeUnit idleTimeoutUnit)voidsetInitialWindowSize(int initialWindowSize)voidsetLogActivity(boolean logActivity)voidsetMaxChunkSize(int maxChunkSize)voidsetMaxConcurrentStreams(long maxConcurrentStreams)voidsetMaxFrameSize(int maxFrameSize)voidsetMaxHeaderListSize(long maxHeaderListSize)voidsetMaxHeaderSize(int maxHeaderSize)voidsetMaxInitialLineLength(int maxInitialLineLength)voidsetMaxWebsocketFrameSize(int maxWebSocketFrameSize)Deprecated.voidsetMaxWebSocketFrameSize(int maxWebSocketFrameSize)voidsetMaxWebsocketMessageSize(int maxWebSocketMessageSize)Deprecated.voidsetMaxWebSocketMessageSize(int maxWebSocketMessageSize)voidsetPerFrameWebsocketCompressionSupported(boolean perFrameWebSocketCompressionSupported)Deprecated.voidsetPerFrameWebSocketCompressionSupported(boolean perFrameWebSocketCompressionSupported)voidsetPerMessageWebsocketCompressionSupported(boolean perMessageWebSocketCompressionSupported)Deprecated.voidsetPerMessageWebSocketCompressionSupported(boolean perMessageWebSocketCompressionSupported)voidsetPort(int port)voidsetPushEnabled(boolean pushEnabled)voidsetReceiveBufferSize(int receiveBufferSize)voidsetReuseAddress(boolean reuseAddress)voidsetReusePort(boolean reusePort)voidsetSendBufferSize(int sendBufferSize)voidsetSni(boolean sni)voidsetSoLinger(int soLinger)voidsetSsl(boolean ssl)voidsetTcpCork(boolean tcpCork)voidsetTcpFastOpen(boolean tcpFastOpen)voidsetTcpKeepAlive(boolean tcpKeepAlive)voidsetTcpNoDelay(boolean tcpNoDelay)voidsetTcpQuickAck(boolean tcpQuickAck)voidsetTrafficClass(int trafficClass)voidsetUseAlpn(boolean useAlpn)voidsetWebsocketAllowServerNoContext(boolean allowServerNoContext)Deprecated.voidsetWebSocketAllowServerNoContext(boolean allowServerNoContext)voidsetWebsocketCompressionLevel(int webSocketCompressionLevel)Deprecated.voidsetWebSocketCompressionLevel(int webSocketCompressionLevel)voidsetWebsocketPreferredClientNoContext(boolean preferredClientNoContext)Deprecated.voidsetWebSocketPreferredClientNoContext(boolean preferredClientNoContext)voidsetWebSocketSubProtocols(List<String> subProtocols)
-
-
-
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:
trueif 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()
Deprecated.- 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()
Deprecated.- 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()
-
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:
trueif 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()
Deprecated.Get whether WebSocket the per-frame deflate compression extension is supported.- Returns:
trueif 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:
trueif 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()
Deprecated.Get whether WebSocket per-message deflate compression extension is supported.- Returns:
trueif 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:
trueif 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()
Deprecated.- 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()
Deprecated.- Returns:
truewhen the WebSocket server will accept theserver_no_context_takeoverparameter for the per-message deflate compression extension offered by the client- See Also:
HttpServerOptions.getWebSocketAllowServerNoContext()
-
isWebSocketAllowServerNoContext
public boolean isWebSocketAllowServerNoContext()
- Returns:
truewhen the WebSocket server will accept theserver_no_context_takeoverparameter 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()
Deprecated.- Returns:
truewhen the WebSocket server will accept theclient_no_context_takeoverparameter for the per-message deflate compression extension offered by the client- See Also:
HttpServerOptions.getWebSocketPreferredClientNoContext()
-
isWebSocketPreferredClientNoContext
public boolean isWebSocketPreferredClientNoContext()
- Returns:
truewhen the WebSocket server will accept theclient_no_context_takeoverparameter 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()
-
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()
-
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_FASTOPENoption is enabled - See Also:
TCPSSLOptions.isTcpFastOpen()
-
setTcpFastOpen
public void setTcpFastOpen(boolean tcpFastOpen)
-
isTcpCork
public boolean isTcpCork()
- Returns:
- wether
TCP_CORKoption is enabled - See Also:
TCPSSLOptions.isTcpCork()
-
setTcpCork
public void setTcpCork(boolean tcpCork)
-
isTcpQuickAck
public boolean isTcpQuickAck()
- Returns:
- wether
TCP_QUICKACKoption 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)
-
-