io.vertx.kotlin.core.http.HttpServerOptions.kt Maven / Gradle / Ivy
/*
* Copyright 2019 Red Hat, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* The Apache License v2.0 is available at
* http://www.opensource.org/licenses/apache2.0.php
*
* You may elect to redistribute this code under either of these licenses.
*/
package io.vertx.kotlin.core.http
import io.vertx.core.http.HttpServerOptions
import io.vertx.core.http.ClientAuth
import io.vertx.core.http.Http2Settings
import io.vertx.core.http.HttpVersion
import io.vertx.core.net.JdkSSLEngineOptions
import io.vertx.core.net.JksOptions
import io.vertx.core.net.OpenSSLEngineOptions
import io.vertx.core.net.PemKeyCertOptions
import io.vertx.core.net.PemTrustOptions
import io.vertx.core.net.PfxOptions
import java.util.concurrent.TimeUnit
/**
* A function providing a DSL for building [io.vertx.core.http.HttpServerOptions] objects.
*
* Represents options used by an [io.vertx.core.http.HttpServer] instance
*
* @param acceptBacklog Set the accept back log
* @param acceptUnmaskedFrames Set true
when the server accepts unmasked frame. As default Server doesn't accept unmasked frame, you can bypass this behaviour (RFC 6455) setting true
. It's set to false
as default.
* @param alpnVersions Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiatiation.
* @param clientAuth Set whether client auth is required
* @param clientAuthRequired Set whether client auth is required
* @param compressionLevel This method allows to set the compression level to be used in http1.x/2 response bodies when compression support is turned on (@see setCompressionSupported) and the client advertises to support deflate/gzip
compression in the Accept-Encoding
header default value is : 6 (Netty legacy) The compression level determines how much the data is compressed on a scale from 1 to 9, where '9' is trying to achieve the maximum compression ratio while '1' instead is giving priority to speed instead of compression ratio using some algorithm optimizations and skipping pedantic loops that usually gives just little improvements While one can think that best value is always the maximum compression ratio, there's a trade-off to consider: the most compressed level requires the most computational work to compress/decompress data, e.g. more dictionary lookups and loops. E.g. you have it set fairly high on a high-volume website, you may experience performance degradation and latency on resource serving due to CPU overload, and, however - as the computational work is required also client side while decompressing - setting an higher compression level can result in an overall higher page load time especially nowadays when many clients are handled mobile devices with a low CPU profile. see also: http://www.gzip.org/algorithm.txt
* @param compressionSupported Set whether the server should support gzip/deflate compression (serving compressed responses to clients advertising support for them with Accept-Encoding header)
* @param crlPaths Add a CRL path
* @param crlValues Add a CRL value
* @param decoderInitialBufferSize Set the initial buffer size for the HTTP decoder
* @param decompressionSupported Set whether the server supports decompression
* @param enabledCipherSuites Add an enabled cipher suite, appended to the ordered suites.
* @param enabledSecureTransportProtocols Sets the list of enabled SSL/TLS protocols.
* @param handle100ContinueAutomatically Set whether 100 Continue should be handled automatically
* @param host Set the host
* @param http2ConnectionWindowSize Set the default HTTP/2 connection window size. It overrides the initial window size set by [io.vertx.core.http.Http2Settings], 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.
* @param idleTimeout 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 within the timeout. If you want change default time unit, use [io.vertx.core.http.HttpServerOptions]
* @param idleTimeoutUnit Set the idle timeout unit. If not specified, default is seconds.
* @param initialSettings Set the HTTP/2 connection settings immediatly sent by the server when a client connects.
* @param jdkSslEngineOptions
* @param keyStoreOptions Set the key/cert options in jks format, aka Java keystore.
* @param logActivity Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
* @param maxChunkSize Set the maximum HTTP chunk size that [io.vertx.core.http.HttpServerRequest] will receive
* @param maxFormAttributeSize Set the maximum size of a form attribute. Set to -1
to allow unlimited length
* @param maxHeaderSize Set the maximum length of all headers for HTTP/1.x .
* @param maxInitialLineLength Set the maximum length of the initial line for HTTP/1.x (e.g. "GET / HTTP/1.0"
)
* @param maxWebSocketFrameSize Set the maximum WebSocket frames size
* @param maxWebSocketMessageSize Set the maximum WebSocket message size
* @param maxWebsocketFrameSize Set the maximum WebSocket frames size
* @param maxWebsocketMessageSize Set the maximum WebSocket message size
* @param openSslEngineOptions
* @param pemKeyCertOptions Set the key/cert store options in pem format.
* @param pemTrustOptions Set the trust options in pem format
* @param perFrameWebSocketCompressionSupported Enable or disable support for the WebSocket per-frame deflate compression extension.
* @param perFrameWebsocketCompressionSupported Enable or disable support for the WebSocket per-frame deflate compression extension.
* @param perMessageWebSocketCompressionSupported Enable or disable support for WebSocket per-message deflate compression extension.
* @param perMessageWebsocketCompressionSupported Enable or disable support for WebSocket per-message deflate compression extension.
* @param pfxKeyCertOptions Set the key/cert options in pfx format.
* @param pfxTrustOptions Set the trust options in pfx format
* @param port Set the port
* @param receiveBufferSize Set the TCP receive buffer size
* @param reuseAddress Set the value of reuse address
* @param reusePort Set the value of reuse port. This is only supported by native transports.
* @param sendBufferSize Set the TCP send buffer size
* @param sni Set whether the server supports Server Name Indiciation
* @param soLinger Set whether SO_linger keep alive is enabled
* @param ssl Set whether SSL/TLS is enabled
* @param sslHandshakeTimeout Set the SSL handshake timeout, default time unit is seconds.
* @param sslHandshakeTimeoutUnit Set the SSL handshake timeout unit. If not specified, default is seconds.
* @param tcpCork Enable the TCP_CORK
option - only with linux native transport.
* @param tcpFastOpen Enable the TCP_FASTOPEN
option - only with linux native transport.
* @param tcpKeepAlive Set whether TCP keep alive is enabled
* @param tcpNoDelay Set whether TCP no delay is enabled
* @param tcpQuickAck Enable the TCP_QUICKACK
option - only with linux native transport.
* @param tcpUserTimeout Sets the TCP_USER_TIMEOUT
option - only with linux native transport.
* @param trafficClass Set the value of traffic class
* @param trustStoreOptions Set the trust options in jks format, aka Java truststore
* @param useAlpn Set the ALPN usage.
* @param usePooledBuffers Set whether Netty pooled buffers are enabled
* @param webSocketAllowServerNoContext Set whether the WebSocket server will accept the server_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param webSocketClosingTimeout Set the amount of time a server WebSocket will wait until it closes the TCP connection after sending a close frame. When a server closes a WebSocket, it should wait the client close frame to close the TCP connection. This timeout will close the TCP connection on the server when it expires. When the TCP connection is closed receiving the close frame, the [io.vertx.core.http.WebSocket] instead of the [io.vertx.core.http.WebSocket] will be called.
Set to 0L
closes the TCP connection immediately after sending the close frame.
Set to a negative value to disable it.
* @param webSocketCompressionLevel Set the WebSocket compression level.
* @param webSocketPreferredClientNoContext Set whether the WebSocket server will accept the client_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param webSocketSubProtocols Set the WebSocket list of sub-protocol supported by the server.
* @param websocketAllowServerNoContext Set whether the WebSocket server will accept the server_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param websocketCompressionLevel Set the WebSocket compression level.
* @param websocketPreferredClientNoContext Set whether the WebSocket server will accept the client_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param websocketSubProtocols Set the WebSocket sub-protocols supported by the server.
*
*
* NOTE: This function has been automatically generated from the [io.vertx.core.http.HttpServerOptions original] using Vert.x codegen.
*/
fun httpServerOptionsOf(
acceptBacklog: Int? = null,
acceptUnmaskedFrames: Boolean? = null,
alpnVersions: Iterable? = null,
clientAuth: ClientAuth? = null,
clientAuthRequired: Boolean? = null,
compressionLevel: Int? = null,
compressionSupported: Boolean? = null,
crlPaths: Iterable? = null,
crlValues: Iterable? = null,
decoderInitialBufferSize: Int? = null,
decompressionSupported: Boolean? = null,
enabledCipherSuites: Iterable? = null,
enabledSecureTransportProtocols: Iterable? = null,
handle100ContinueAutomatically: Boolean? = null,
host: String? = null,
http2ConnectionWindowSize: Int? = null,
idleTimeout: Int? = null,
idleTimeoutUnit: TimeUnit? = null,
initialSettings: io.vertx.core.http.Http2Settings? = null,
jdkSslEngineOptions: io.vertx.core.net.JdkSSLEngineOptions? = null,
keyStoreOptions: io.vertx.core.net.JksOptions? = null,
logActivity: Boolean? = null,
maxChunkSize: Int? = null,
maxFormAttributeSize: Int? = null,
maxHeaderSize: Int? = null,
maxInitialLineLength: Int? = null,
maxWebSocketFrameSize: Int? = null,
maxWebSocketMessageSize: Int? = null,
maxWebsocketFrameSize: Int? = null,
maxWebsocketMessageSize: Int? = null,
openSslEngineOptions: io.vertx.core.net.OpenSSLEngineOptions? = null,
pemKeyCertOptions: io.vertx.core.net.PemKeyCertOptions? = null,
pemTrustOptions: io.vertx.core.net.PemTrustOptions? = null,
perFrameWebSocketCompressionSupported: Boolean? = null,
perFrameWebsocketCompressionSupported: Boolean? = null,
perMessageWebSocketCompressionSupported: Boolean? = null,
perMessageWebsocketCompressionSupported: Boolean? = null,
pfxKeyCertOptions: io.vertx.core.net.PfxOptions? = null,
pfxTrustOptions: io.vertx.core.net.PfxOptions? = null,
port: Int? = null,
receiveBufferSize: Int? = null,
reuseAddress: Boolean? = null,
reusePort: Boolean? = null,
sendBufferSize: Int? = null,
sni: Boolean? = null,
soLinger: Int? = null,
ssl: Boolean? = null,
sslHandshakeTimeout: Long? = null,
sslHandshakeTimeoutUnit: TimeUnit? = null,
tcpCork: Boolean? = null,
tcpFastOpen: Boolean? = null,
tcpKeepAlive: Boolean? = null,
tcpNoDelay: Boolean? = null,
tcpQuickAck: Boolean? = null,
tcpUserTimeout: Int? = null,
trafficClass: Int? = null,
trustStoreOptions: io.vertx.core.net.JksOptions? = null,
useAlpn: Boolean? = null,
usePooledBuffers: Boolean? = null,
webSocketAllowServerNoContext: Boolean? = null,
webSocketClosingTimeout: Int? = null,
webSocketCompressionLevel: Int? = null,
webSocketPreferredClientNoContext: Boolean? = null,
webSocketSubProtocols: Iterable? = null,
websocketAllowServerNoContext: Boolean? = null,
websocketCompressionLevel: Int? = null,
websocketPreferredClientNoContext: Boolean? = null,
websocketSubProtocols: String? = null): HttpServerOptions = io.vertx.core.http.HttpServerOptions().apply {
if (acceptBacklog != null) {
this.setAcceptBacklog(acceptBacklog)
}
if (acceptUnmaskedFrames != null) {
this.setAcceptUnmaskedFrames(acceptUnmaskedFrames)
}
if (alpnVersions != null) {
this.setAlpnVersions(alpnVersions.toList())
}
if (clientAuth != null) {
this.setClientAuth(clientAuth)
}
if (clientAuthRequired != null) {
this.setClientAuthRequired(clientAuthRequired)
}
if (compressionLevel != null) {
this.setCompressionLevel(compressionLevel)
}
if (compressionSupported != null) {
this.setCompressionSupported(compressionSupported)
}
if (crlPaths != null) {
for (item in crlPaths) {
this.addCrlPath(item)
}
}
if (crlValues != null) {
for (item in crlValues) {
this.addCrlValue(item)
}
}
if (decoderInitialBufferSize != null) {
this.setDecoderInitialBufferSize(decoderInitialBufferSize)
}
if (decompressionSupported != null) {
this.setDecompressionSupported(decompressionSupported)
}
if (enabledCipherSuites != null) {
for (item in enabledCipherSuites) {
this.addEnabledCipherSuite(item)
}
}
if (enabledSecureTransportProtocols != null) {
this.setEnabledSecureTransportProtocols(enabledSecureTransportProtocols.toSet())
}
if (handle100ContinueAutomatically != null) {
this.setHandle100ContinueAutomatically(handle100ContinueAutomatically)
}
if (host != null) {
this.setHost(host)
}
if (http2ConnectionWindowSize != null) {
this.setHttp2ConnectionWindowSize(http2ConnectionWindowSize)
}
if (idleTimeout != null) {
this.setIdleTimeout(idleTimeout)
}
if (idleTimeoutUnit != null) {
this.setIdleTimeoutUnit(idleTimeoutUnit)
}
if (initialSettings != null) {
this.setInitialSettings(initialSettings)
}
if (jdkSslEngineOptions != null) {
this.setJdkSslEngineOptions(jdkSslEngineOptions)
}
if (keyStoreOptions != null) {
this.setKeyStoreOptions(keyStoreOptions)
}
if (logActivity != null) {
this.setLogActivity(logActivity)
}
if (maxChunkSize != null) {
this.setMaxChunkSize(maxChunkSize)
}
if (maxFormAttributeSize != null) {
this.setMaxFormAttributeSize(maxFormAttributeSize)
}
if (maxHeaderSize != null) {
this.setMaxHeaderSize(maxHeaderSize)
}
if (maxInitialLineLength != null) {
this.setMaxInitialLineLength(maxInitialLineLength)
}
if (maxWebSocketFrameSize != null) {
this.setMaxWebSocketFrameSize(maxWebSocketFrameSize)
}
if (maxWebSocketMessageSize != null) {
this.setMaxWebSocketMessageSize(maxWebSocketMessageSize)
}
if (maxWebsocketFrameSize != null) {
this.setMaxWebsocketFrameSize(maxWebsocketFrameSize)
}
if (maxWebsocketMessageSize != null) {
this.setMaxWebsocketMessageSize(maxWebsocketMessageSize)
}
if (openSslEngineOptions != null) {
this.setOpenSslEngineOptions(openSslEngineOptions)
}
if (pemKeyCertOptions != null) {
this.setPemKeyCertOptions(pemKeyCertOptions)
}
if (pemTrustOptions != null) {
this.setPemTrustOptions(pemTrustOptions)
}
if (perFrameWebSocketCompressionSupported != null) {
this.setPerFrameWebSocketCompressionSupported(perFrameWebSocketCompressionSupported)
}
if (perFrameWebsocketCompressionSupported != null) {
this.setPerFrameWebsocketCompressionSupported(perFrameWebsocketCompressionSupported)
}
if (perMessageWebSocketCompressionSupported != null) {
this.setPerMessageWebSocketCompressionSupported(perMessageWebSocketCompressionSupported)
}
if (perMessageWebsocketCompressionSupported != null) {
this.setPerMessageWebsocketCompressionSupported(perMessageWebsocketCompressionSupported)
}
if (pfxKeyCertOptions != null) {
this.setPfxKeyCertOptions(pfxKeyCertOptions)
}
if (pfxTrustOptions != null) {
this.setPfxTrustOptions(pfxTrustOptions)
}
if (port != null) {
this.setPort(port)
}
if (receiveBufferSize != null) {
this.setReceiveBufferSize(receiveBufferSize)
}
if (reuseAddress != null) {
this.setReuseAddress(reuseAddress)
}
if (reusePort != null) {
this.setReusePort(reusePort)
}
if (sendBufferSize != null) {
this.setSendBufferSize(sendBufferSize)
}
if (sni != null) {
this.setSni(sni)
}
if (soLinger != null) {
this.setSoLinger(soLinger)
}
if (ssl != null) {
this.setSsl(ssl)
}
if (sslHandshakeTimeout != null) {
this.setSslHandshakeTimeout(sslHandshakeTimeout)
}
if (sslHandshakeTimeoutUnit != null) {
this.setSslHandshakeTimeoutUnit(sslHandshakeTimeoutUnit)
}
if (tcpCork != null) {
this.setTcpCork(tcpCork)
}
if (tcpFastOpen != null) {
this.setTcpFastOpen(tcpFastOpen)
}
if (tcpKeepAlive != null) {
this.setTcpKeepAlive(tcpKeepAlive)
}
if (tcpNoDelay != null) {
this.setTcpNoDelay(tcpNoDelay)
}
if (tcpQuickAck != null) {
this.setTcpQuickAck(tcpQuickAck)
}
if (tcpUserTimeout != null) {
this.setTcpUserTimeout(tcpUserTimeout)
}
if (trafficClass != null) {
this.setTrafficClass(trafficClass)
}
if (trustStoreOptions != null) {
this.setTrustStoreOptions(trustStoreOptions)
}
if (useAlpn != null) {
this.setUseAlpn(useAlpn)
}
if (usePooledBuffers != null) {
this.setUsePooledBuffers(usePooledBuffers)
}
if (webSocketAllowServerNoContext != null) {
this.setWebSocketAllowServerNoContext(webSocketAllowServerNoContext)
}
if (webSocketClosingTimeout != null) {
this.setWebSocketClosingTimeout(webSocketClosingTimeout)
}
if (webSocketCompressionLevel != null) {
this.setWebSocketCompressionLevel(webSocketCompressionLevel)
}
if (webSocketPreferredClientNoContext != null) {
this.setWebSocketPreferredClientNoContext(webSocketPreferredClientNoContext)
}
if (webSocketSubProtocols != null) {
this.setWebSocketSubProtocols(webSocketSubProtocols.toList())
}
if (websocketAllowServerNoContext != null) {
this.setWebsocketAllowServerNoContext(websocketAllowServerNoContext)
}
if (websocketCompressionLevel != null) {
this.setWebsocketCompressionLevel(websocketCompressionLevel)
}
if (websocketPreferredClientNoContext != null) {
this.setWebsocketPreferredClientNoContext(websocketPreferredClientNoContext)
}
if (websocketSubProtocols != null) {
this.setWebsocketSubProtocols(websocketSubProtocols)
}
}
/**
* A function providing a DSL for building [io.vertx.core.http.HttpServerOptions] objects.
*
* Represents options used by an [io.vertx.core.http.HttpServer] instance
*
* @param acceptBacklog Set the accept back log
* @param acceptUnmaskedFrames Set true
when the server accepts unmasked frame. As default Server doesn't accept unmasked frame, you can bypass this behaviour (RFC 6455) setting true
. It's set to false
as default.
* @param alpnVersions Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiatiation.
* @param clientAuth Set whether client auth is required
* @param clientAuthRequired Set whether client auth is required
* @param compressionLevel This method allows to set the compression level to be used in http1.x/2 response bodies when compression support is turned on (@see setCompressionSupported) and the client advertises to support deflate/gzip
compression in the Accept-Encoding
header default value is : 6 (Netty legacy) The compression level determines how much the data is compressed on a scale from 1 to 9, where '9' is trying to achieve the maximum compression ratio while '1' instead is giving priority to speed instead of compression ratio using some algorithm optimizations and skipping pedantic loops that usually gives just little improvements While one can think that best value is always the maximum compression ratio, there's a trade-off to consider: the most compressed level requires the most computational work to compress/decompress data, e.g. more dictionary lookups and loops. E.g. you have it set fairly high on a high-volume website, you may experience performance degradation and latency on resource serving due to CPU overload, and, however - as the computational work is required also client side while decompressing - setting an higher compression level can result in an overall higher page load time especially nowadays when many clients are handled mobile devices with a low CPU profile. see also: http://www.gzip.org/algorithm.txt
* @param compressionSupported Set whether the server should support gzip/deflate compression (serving compressed responses to clients advertising support for them with Accept-Encoding header)
* @param crlPaths Add a CRL path
* @param crlValues Add a CRL value
* @param decoderInitialBufferSize Set the initial buffer size for the HTTP decoder
* @param decompressionSupported Set whether the server supports decompression
* @param enabledCipherSuites Add an enabled cipher suite, appended to the ordered suites.
* @param enabledSecureTransportProtocols Sets the list of enabled SSL/TLS protocols.
* @param handle100ContinueAutomatically Set whether 100 Continue should be handled automatically
* @param host Set the host
* @param http2ConnectionWindowSize Set the default HTTP/2 connection window size. It overrides the initial window size set by [io.vertx.core.http.Http2Settings], 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.
* @param idleTimeout 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 within the timeout. If you want change default time unit, use [io.vertx.core.http.HttpServerOptions]
* @param idleTimeoutUnit Set the idle timeout unit. If not specified, default is seconds.
* @param initialSettings Set the HTTP/2 connection settings immediatly sent by the server when a client connects.
* @param jdkSslEngineOptions
* @param keyStoreOptions Set the key/cert options in jks format, aka Java keystore.
* @param logActivity Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
* @param maxChunkSize Set the maximum HTTP chunk size that [io.vertx.core.http.HttpServerRequest] will receive
* @param maxFormAttributeSize Set the maximum size of a form attribute. Set to -1
to allow unlimited length
* @param maxHeaderSize Set the maximum length of all headers for HTTP/1.x .
* @param maxInitialLineLength Set the maximum length of the initial line for HTTP/1.x (e.g. "GET / HTTP/1.0"
)
* @param maxWebSocketFrameSize Set the maximum WebSocket frames size
* @param maxWebSocketMessageSize Set the maximum WebSocket message size
* @param maxWebsocketFrameSize Set the maximum WebSocket frames size
* @param maxWebsocketMessageSize Set the maximum WebSocket message size
* @param openSslEngineOptions
* @param pemKeyCertOptions Set the key/cert store options in pem format.
* @param pemTrustOptions Set the trust options in pem format
* @param perFrameWebSocketCompressionSupported Enable or disable support for the WebSocket per-frame deflate compression extension.
* @param perFrameWebsocketCompressionSupported Enable or disable support for the WebSocket per-frame deflate compression extension.
* @param perMessageWebSocketCompressionSupported Enable or disable support for WebSocket per-message deflate compression extension.
* @param perMessageWebsocketCompressionSupported Enable or disable support for WebSocket per-message deflate compression extension.
* @param pfxKeyCertOptions Set the key/cert options in pfx format.
* @param pfxTrustOptions Set the trust options in pfx format
* @param port Set the port
* @param receiveBufferSize Set the TCP receive buffer size
* @param reuseAddress Set the value of reuse address
* @param reusePort Set the value of reuse port. This is only supported by native transports.
* @param sendBufferSize Set the TCP send buffer size
* @param sni Set whether the server supports Server Name Indiciation
* @param soLinger Set whether SO_linger keep alive is enabled
* @param ssl Set whether SSL/TLS is enabled
* @param sslHandshakeTimeout Set the SSL handshake timeout, default time unit is seconds.
* @param sslHandshakeTimeoutUnit Set the SSL handshake timeout unit. If not specified, default is seconds.
* @param tcpCork Enable the TCP_CORK
option - only with linux native transport.
* @param tcpFastOpen Enable the TCP_FASTOPEN
option - only with linux native transport.
* @param tcpKeepAlive Set whether TCP keep alive is enabled
* @param tcpNoDelay Set whether TCP no delay is enabled
* @param tcpQuickAck Enable the TCP_QUICKACK
option - only with linux native transport.
* @param tcpUserTimeout Sets the TCP_USER_TIMEOUT
option - only with linux native transport.
* @param trafficClass Set the value of traffic class
* @param trustStoreOptions Set the trust options in jks format, aka Java truststore
* @param useAlpn Set the ALPN usage.
* @param usePooledBuffers Set whether Netty pooled buffers are enabled
* @param webSocketAllowServerNoContext Set whether the WebSocket server will accept the server_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param webSocketClosingTimeout Set the amount of time a server WebSocket will wait until it closes the TCP connection after sending a close frame. When a server closes a WebSocket, it should wait the client close frame to close the TCP connection. This timeout will close the TCP connection on the server when it expires. When the TCP connection is closed receiving the close frame, the [io.vertx.core.http.WebSocket] instead of the [io.vertx.core.http.WebSocket] will be called.
Set to 0L
closes the TCP connection immediately after sending the close frame.
Set to a negative value to disable it.
* @param webSocketCompressionLevel Set the WebSocket compression level.
* @param webSocketPreferredClientNoContext Set whether the WebSocket server will accept the client_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param webSocketSubProtocols Set the WebSocket list of sub-protocol supported by the server.
* @param websocketAllowServerNoContext Set whether the WebSocket server will accept the server_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param websocketCompressionLevel Set the WebSocket compression level.
* @param websocketPreferredClientNoContext Set whether the WebSocket server will accept the client_no_context_takeover
parameter of the per-message deflate compression extension offered by the client.
* @param websocketSubProtocols Set the WebSocket sub-protocols supported by the server.
*
*
* NOTE: This function has been automatically generated from the [io.vertx.core.http.HttpServerOptions original] using Vert.x codegen.
*/
@Deprecated(
message = "This function will be removed in a future version",
replaceWith = ReplaceWith("httpServerOptionsOf(acceptBacklog, acceptUnmaskedFrames, alpnVersions, clientAuth, clientAuthRequired, compressionLevel, compressionSupported, crlPaths, crlValues, decoderInitialBufferSize, decompressionSupported, enabledCipherSuites, enabledSecureTransportProtocols, handle100ContinueAutomatically, host, http2ConnectionWindowSize, idleTimeout, idleTimeoutUnit, initialSettings, jdkSslEngineOptions, keyStoreOptions, logActivity, maxChunkSize, maxFormAttributeSize, maxHeaderSize, maxInitialLineLength, maxWebSocketFrameSize, maxWebSocketMessageSize, maxWebsocketFrameSize, maxWebsocketMessageSize, openSslEngineOptions, pemKeyCertOptions, pemTrustOptions, perFrameWebSocketCompressionSupported, perFrameWebsocketCompressionSupported, perMessageWebSocketCompressionSupported, perMessageWebsocketCompressionSupported, pfxKeyCertOptions, pfxTrustOptions, port, receiveBufferSize, reuseAddress, reusePort, sendBufferSize, sni, soLinger, ssl, sslHandshakeTimeout, sslHandshakeTimeoutUnit, tcpCork, tcpFastOpen, tcpKeepAlive, tcpNoDelay, tcpQuickAck, tcpUserTimeout, trafficClass, trustStoreOptions, useAlpn, usePooledBuffers, webSocketAllowServerNoContext, webSocketClosingTimeout, webSocketCompressionLevel, webSocketPreferredClientNoContext, webSocketSubProtocols, websocketAllowServerNoContext, websocketCompressionLevel, websocketPreferredClientNoContext, websocketSubProtocols)")
)
fun HttpServerOptions(
acceptBacklog: Int? = null,
acceptUnmaskedFrames: Boolean? = null,
alpnVersions: Iterable? = null,
clientAuth: ClientAuth? = null,
clientAuthRequired: Boolean? = null,
compressionLevel: Int? = null,
compressionSupported: Boolean? = null,
crlPaths: Iterable? = null,
crlValues: Iterable? = null,
decoderInitialBufferSize: Int? = null,
decompressionSupported: Boolean? = null,
enabledCipherSuites: Iterable? = null,
enabledSecureTransportProtocols: Iterable? = null,
handle100ContinueAutomatically: Boolean? = null,
host: String? = null,
http2ConnectionWindowSize: Int? = null,
idleTimeout: Int? = null,
idleTimeoutUnit: TimeUnit? = null,
initialSettings: io.vertx.core.http.Http2Settings? = null,
jdkSslEngineOptions: io.vertx.core.net.JdkSSLEngineOptions? = null,
keyStoreOptions: io.vertx.core.net.JksOptions? = null,
logActivity: Boolean? = null,
maxChunkSize: Int? = null,
maxFormAttributeSize: Int? = null,
maxHeaderSize: Int? = null,
maxInitialLineLength: Int? = null,
maxWebSocketFrameSize: Int? = null,
maxWebSocketMessageSize: Int? = null,
maxWebsocketFrameSize: Int? = null,
maxWebsocketMessageSize: Int? = null,
openSslEngineOptions: io.vertx.core.net.OpenSSLEngineOptions? = null,
pemKeyCertOptions: io.vertx.core.net.PemKeyCertOptions? = null,
pemTrustOptions: io.vertx.core.net.PemTrustOptions? = null,
perFrameWebSocketCompressionSupported: Boolean? = null,
perFrameWebsocketCompressionSupported: Boolean? = null,
perMessageWebSocketCompressionSupported: Boolean? = null,
perMessageWebsocketCompressionSupported: Boolean? = null,
pfxKeyCertOptions: io.vertx.core.net.PfxOptions? = null,
pfxTrustOptions: io.vertx.core.net.PfxOptions? = null,
port: Int? = null,
receiveBufferSize: Int? = null,
reuseAddress: Boolean? = null,
reusePort: Boolean? = null,
sendBufferSize: Int? = null,
sni: Boolean? = null,
soLinger: Int? = null,
ssl: Boolean? = null,
sslHandshakeTimeout: Long? = null,
sslHandshakeTimeoutUnit: TimeUnit? = null,
tcpCork: Boolean? = null,
tcpFastOpen: Boolean? = null,
tcpKeepAlive: Boolean? = null,
tcpNoDelay: Boolean? = null,
tcpQuickAck: Boolean? = null,
tcpUserTimeout: Int? = null,
trafficClass: Int? = null,
trustStoreOptions: io.vertx.core.net.JksOptions? = null,
useAlpn: Boolean? = null,
usePooledBuffers: Boolean? = null,
webSocketAllowServerNoContext: Boolean? = null,
webSocketClosingTimeout: Int? = null,
webSocketCompressionLevel: Int? = null,
webSocketPreferredClientNoContext: Boolean? = null,
webSocketSubProtocols: Iterable? = null,
websocketAllowServerNoContext: Boolean? = null,
websocketCompressionLevel: Int? = null,
websocketPreferredClientNoContext: Boolean? = null,
websocketSubProtocols: String? = null): HttpServerOptions = io.vertx.core.http.HttpServerOptions().apply {
if (acceptBacklog != null) {
this.setAcceptBacklog(acceptBacklog)
}
if (acceptUnmaskedFrames != null) {
this.setAcceptUnmaskedFrames(acceptUnmaskedFrames)
}
if (alpnVersions != null) {
this.setAlpnVersions(alpnVersions.toList())
}
if (clientAuth != null) {
this.setClientAuth(clientAuth)
}
if (clientAuthRequired != null) {
this.setClientAuthRequired(clientAuthRequired)
}
if (compressionLevel != null) {
this.setCompressionLevel(compressionLevel)
}
if (compressionSupported != null) {
this.setCompressionSupported(compressionSupported)
}
if (crlPaths != null) {
for (item in crlPaths) {
this.addCrlPath(item)
}
}
if (crlValues != null) {
for (item in crlValues) {
this.addCrlValue(item)
}
}
if (decoderInitialBufferSize != null) {
this.setDecoderInitialBufferSize(decoderInitialBufferSize)
}
if (decompressionSupported != null) {
this.setDecompressionSupported(decompressionSupported)
}
if (enabledCipherSuites != null) {
for (item in enabledCipherSuites) {
this.addEnabledCipherSuite(item)
}
}
if (enabledSecureTransportProtocols != null) {
this.setEnabledSecureTransportProtocols(enabledSecureTransportProtocols.toSet())
}
if (handle100ContinueAutomatically != null) {
this.setHandle100ContinueAutomatically(handle100ContinueAutomatically)
}
if (host != null) {
this.setHost(host)
}
if (http2ConnectionWindowSize != null) {
this.setHttp2ConnectionWindowSize(http2ConnectionWindowSize)
}
if (idleTimeout != null) {
this.setIdleTimeout(idleTimeout)
}
if (idleTimeoutUnit != null) {
this.setIdleTimeoutUnit(idleTimeoutUnit)
}
if (initialSettings != null) {
this.setInitialSettings(initialSettings)
}
if (jdkSslEngineOptions != null) {
this.setJdkSslEngineOptions(jdkSslEngineOptions)
}
if (keyStoreOptions != null) {
this.setKeyStoreOptions(keyStoreOptions)
}
if (logActivity != null) {
this.setLogActivity(logActivity)
}
if (maxChunkSize != null) {
this.setMaxChunkSize(maxChunkSize)
}
if (maxFormAttributeSize != null) {
this.setMaxFormAttributeSize(maxFormAttributeSize)
}
if (maxHeaderSize != null) {
this.setMaxHeaderSize(maxHeaderSize)
}
if (maxInitialLineLength != null) {
this.setMaxInitialLineLength(maxInitialLineLength)
}
if (maxWebSocketFrameSize != null) {
this.setMaxWebSocketFrameSize(maxWebSocketFrameSize)
}
if (maxWebSocketMessageSize != null) {
this.setMaxWebSocketMessageSize(maxWebSocketMessageSize)
}
if (maxWebsocketFrameSize != null) {
this.setMaxWebsocketFrameSize(maxWebsocketFrameSize)
}
if (maxWebsocketMessageSize != null) {
this.setMaxWebsocketMessageSize(maxWebsocketMessageSize)
}
if (openSslEngineOptions != null) {
this.setOpenSslEngineOptions(openSslEngineOptions)
}
if (pemKeyCertOptions != null) {
this.setPemKeyCertOptions(pemKeyCertOptions)
}
if (pemTrustOptions != null) {
this.setPemTrustOptions(pemTrustOptions)
}
if (perFrameWebSocketCompressionSupported != null) {
this.setPerFrameWebSocketCompressionSupported(perFrameWebSocketCompressionSupported)
}
if (perFrameWebsocketCompressionSupported != null) {
this.setPerFrameWebsocketCompressionSupported(perFrameWebsocketCompressionSupported)
}
if (perMessageWebSocketCompressionSupported != null) {
this.setPerMessageWebSocketCompressionSupported(perMessageWebSocketCompressionSupported)
}
if (perMessageWebsocketCompressionSupported != null) {
this.setPerMessageWebsocketCompressionSupported(perMessageWebsocketCompressionSupported)
}
if (pfxKeyCertOptions != null) {
this.setPfxKeyCertOptions(pfxKeyCertOptions)
}
if (pfxTrustOptions != null) {
this.setPfxTrustOptions(pfxTrustOptions)
}
if (port != null) {
this.setPort(port)
}
if (receiveBufferSize != null) {
this.setReceiveBufferSize(receiveBufferSize)
}
if (reuseAddress != null) {
this.setReuseAddress(reuseAddress)
}
if (reusePort != null) {
this.setReusePort(reusePort)
}
if (sendBufferSize != null) {
this.setSendBufferSize(sendBufferSize)
}
if (sni != null) {
this.setSni(sni)
}
if (soLinger != null) {
this.setSoLinger(soLinger)
}
if (ssl != null) {
this.setSsl(ssl)
}
if (sslHandshakeTimeout != null) {
this.setSslHandshakeTimeout(sslHandshakeTimeout)
}
if (sslHandshakeTimeoutUnit != null) {
this.setSslHandshakeTimeoutUnit(sslHandshakeTimeoutUnit)
}
if (tcpCork != null) {
this.setTcpCork(tcpCork)
}
if (tcpFastOpen != null) {
this.setTcpFastOpen(tcpFastOpen)
}
if (tcpKeepAlive != null) {
this.setTcpKeepAlive(tcpKeepAlive)
}
if (tcpNoDelay != null) {
this.setTcpNoDelay(tcpNoDelay)
}
if (tcpQuickAck != null) {
this.setTcpQuickAck(tcpQuickAck)
}
if (tcpUserTimeout != null) {
this.setTcpUserTimeout(tcpUserTimeout)
}
if (trafficClass != null) {
this.setTrafficClass(trafficClass)
}
if (trustStoreOptions != null) {
this.setTrustStoreOptions(trustStoreOptions)
}
if (useAlpn != null) {
this.setUseAlpn(useAlpn)
}
if (usePooledBuffers != null) {
this.setUsePooledBuffers(usePooledBuffers)
}
if (webSocketAllowServerNoContext != null) {
this.setWebSocketAllowServerNoContext(webSocketAllowServerNoContext)
}
if (webSocketClosingTimeout != null) {
this.setWebSocketClosingTimeout(webSocketClosingTimeout)
}
if (webSocketCompressionLevel != null) {
this.setWebSocketCompressionLevel(webSocketCompressionLevel)
}
if (webSocketPreferredClientNoContext != null) {
this.setWebSocketPreferredClientNoContext(webSocketPreferredClientNoContext)
}
if (webSocketSubProtocols != null) {
this.setWebSocketSubProtocols(webSocketSubProtocols.toList())
}
if (websocketAllowServerNoContext != null) {
this.setWebsocketAllowServerNoContext(websocketAllowServerNoContext)
}
if (websocketCompressionLevel != null) {
this.setWebsocketCompressionLevel(websocketCompressionLevel)
}
if (websocketPreferredClientNoContext != null) {
this.setWebsocketPreferredClientNoContext(websocketPreferredClientNoContext)
}
if (websocketSubProtocols != null) {
this.setWebsocketSubProtocols(websocketSubProtocols)
}
}