Class HttpServerOptions
java.lang.Object
io.vertx.core.net.NetworkOptions
io.vertx.core.net.TCPSSLOptions
io.vertx.core.net.NetServerOptions
io.vertx.core.http.HttpServerOptions
- Direct Known Subclasses:
HttpTermOptions
Represents options used by an
HttpServer instance- Author:
- Tim Fox
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDefault WebSocket Masked bit is true as depicted by RFC =falsestatic final List<HttpVersion> Default Application-Layer Protocol Negotiation versions = [HTTP/2,HTTP/1.1]static final intDefault content size threshold for compression = 0 (Netty default)static final intDefault gzip/deflate compression level = 6 (Netty legacy)static final booleanDefault value of whether compression is supported =falsestatic final intDefault initial buffer size for HttpObjectDecoder = 128 bytesstatic final booleanDefault value of whether decompression is supported =falsestatic final booleanDefault value of whether 100-Continue should be handled automatically =falsestatic final booleanUse HTTP/2 multiplex implementation =falsestatic final booleanDefault H2C is enabled =truestatic final intThe default HTTP/2 connection window size = -1static final intHTTP/2 maximum allowed number of small continuation frames.static final intHTTP/2 RST floods DDOS protection, max number of RST frame per time window allowed = 200.static final intHTTP/2 RST floods DDOS protection, time window duration = 30.static final TimeUnitHTTP/2 RST floods DDOS protection, time window duration unit =TimeUnit.SECONDS.static final longThe default initial settings max concurrent stream for an HTTP/2 server = 100static final intDefault max HTTP chunk size = 8192static final intDefault max size of a form attribute = 8192static final intDefault max number buffered bytes when decoding a form = 1024static final intDefault max number of form fields = 256static final intDefault max length of all headers = 8192static final intDefault max length of the initial line (e.g.static final intDefault max WebSocket frame size = 65536static final intDefault max WebSocket message size (could be assembled from multiple frames) is 4 full frames worth of datastatic final StringThe default value of the server metrics = "":static final booleanDefault support for WebSockets per-frame deflate compression extension =truestatic final booleanDefault support for WebSockets per-message deflate compression extension =truestatic final intDefault port the server will listen on = 80static final booleanWhether write-handlers for server websockets should be registered by default = false.static final booleanStrict thread mode = false.static final TracingPolicyDefault tracing control =TracingPolicy.ALWAYSstatic final booleanDefault allowance of theserver_no_context_takeoverWebSocket parameter deflate compression extension =falsestatic final intDefault WebSocket closing timeout = 10 second)static final intDefault WebSocket deflate compression level = 6static final booleanDefault allowance of theclient_no_context_takeoverWebSocket parameter deflate compression extension =falseFields inherited from class NetServerOptions
DEFAULT_ACCEPT_BACKLOG, DEFAULT_HOST, DEFAULT_PROXY_PROTOCOL_TIMEOUT, DEFAULT_PROXY_PROTOCOL_TIMEOUT_TIME_UNIT, DEFAULT_REGISTER_WRITE_HANDLER, DEFAULT_USE_PROXY_PROTOCOLFields inherited from class TCPSSLOptions
DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEAPLIVE_COUNT, DEFAULT_TCP_KEEAPLIVE_IDLE_SECONDS, DEFAULT_TCP_KEEAPLIVE_INTERVAL_SECONDS, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_WRITE_IDLE_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCopy constructorHttpServerOptions(JsonObject json) Create an options from JSON -
Method Summary
Modifier and TypeMethodDescriptionaddCompressor(CompressionOptions compressor) Add a compressor.addCrlPath(String crlPath) Add a CRL pathaddCrlValue(Buffer crlValue) Add a CRL valueaddEnabledCipherSuite(String suite) Add an enabled cipher suite, appended to the ordered suites.addEnabledSecureTransportProtocol(String protocol) Add an enabled SSL/TLS protocols, appended to the ordered protocols.addWebSocketSubProtocol(String subProtocol) Add a WebSocket sub-protocol to the list supported by the server.copy()Copy these options.protected ServerSSLOptionsintintintintintbooleanintintintintintintintintintintbooleanGet whether WebSocket the per-frame deflate compression extension is supported.booleanGet whether WebSocket per-message deflate compression extension is supported.booleanbooleanintintbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanremoveEnabledCipherSuite(String suite) Removes an enabled cipher suite from the ordered suites.removeEnabledSecureTransportProtocol(String protocol) Removes an enabled SSL/TLS protocol from the ordered protocols.setAcceptBacklog(int acceptBacklog) Set the accept back logsetAcceptUnmaskedFrames(boolean acceptUnmaskedFrames) Settruewhen the server accepts unmasked frame.setActivityLogDataFormat(ByteBufFormat activityLogDataFormat) Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.setAlpnVersions(List<HttpVersion> alpnVersions) Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation.setClientAuth(ClientAuth clientAuth) Set whether client auth is requiredsetCompression(CompressionConfig compression) Configure the server compression, this overwrites any previously configuration.setCompressionContentSizeThreshold(int compressionContentSizeThreshold) Set the compression content size threshold if compression is enabled.setCompressionLevel(int 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 supportdeflate/gzipcompression in theAccept-Encodingheader 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.setCompressionSupported(boolean compressionSupported) Set whether the server should support gzip/deflate compression (serving compressed responses to clients advertising support for them with Accept-Encoding header)setCompressors(List<CompressionOptions> compressors) Set the list of compressor to use instead of using the default gzip/deflatesetCompressionLevel(int)configuration.setDecoderInitialBufferSize(int decoderInitialBufferSize) Set the initial buffer size for the HTTP decodersetDecompressionSupported(boolean decompressionSupported) Set whether the server supports decompressionsetEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) Sets the list of enabled SSL/TLS protocols.setHandle100ContinueAutomatically(boolean handle100ContinueAutomatically) Set whether 100 Continue should be handled automaticallySet the hostsetHttp2ClearTextEnabled(boolean http2ClearTextEnabled) Set whether HTTP/2 over clear text is enabled or disabled, default is enabled.setHttp2ConnectionWindowSize(int http2ConnectionWindowSize) Set the default HTTP/2 connection window size.setHttp2MaxSmallContinuationFrames(int http2MaxSmallContinuationFrames) Set the maximum number of small continuation frames allowed, this is used to prevent flood DoS attack via zero-byte continuation frames.setHttp2MultiplexImplementation(boolean http2MultiplexImplementation) Set which HTTP/2 implementation to usesetHttp2RstFloodMaxRstFramePerWindow(int http2RstFloodMaxRstFramePerWindow) Set the max number of RST frame allowed per time window, this is used to prevent HTTP/2 RST frame flood DDOS attacks.setHttp2RstFloodWindowDuration(int http2RstFloodWindowDuration) Set the duration of the time window when checking the max number of RST frames, this is used to prevent HTTP/2 RST frame flood DDOS attacks.setHttp2RstFloodWindowDurationTimeUnit(TimeUnit http2RstFloodWindowDurationTimeUnit) Set the time unit of the duration of the time window when checking the max number of RST frames, this is used to prevent HTTP/2 RST frame flood DDOS attacks.setIdleTimeout(int idleTimeout) Set the idle timeout, default time unit is seconds.setIdleTimeoutUnit(TimeUnit idleTimeoutUnit) Set the idle timeout unit.setInitialSettings(Http2Settings settings) Set the HTTP/2 connection settings immediatly sent by the server when a client connects.setKeyCertOptions(KeyCertOptions options) Set the key/cert options.setLogActivity(boolean logEnabled) Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.setMaxChunkSize(int maxChunkSize) Set the maximum HTTP chunk size thatHttpServerRequest.handler(Handler)will receivesetMaxFormAttributeSize(int maxSize) Set the maximum size of a form attribute.setMaxFormBufferedBytes(int maxFormBufferedBytes) Set the maximum number of bytes a server can buffer when decoding a form.setMaxFormFields(int maxFormFields) Set the maximum number of fields of a form.setMaxHeaderSize(int maxHeaderSize) Set the maximum length of all headers for HTTP/1.x .setMaxInitialLineLength(int maxInitialLineLength) Set the maximum length of the initial line for HTTP/1.x (e.g.setMaxWebSocketFrameSize(int maxWebSocketFrameSize) Set the maximum WebSocket frames sizesetMaxWebSocketMessageSize(int maxWebSocketMessageSize) Set the maximum WebSocket message sizesetMetricsName(String metricsName) Set the metrics name identifying the reported metrics, useful for naming the server metrics.setPerFrameWebSocketCompressionSupported(boolean supported) Enable or disable support for the WebSocket per-frame deflate compression extension.setPerMessageWebSocketCompressionSupported(boolean supported) Enable or disable support for WebSocket per-message deflate compression extension.setPort(int port) Set the portsetProxyProtocolTimeout(long proxyProtocolTimeout) Set the Proxy protocol timeout, default time unit is seconds.setProxyProtocolTimeoutUnit(TimeUnit proxyProtocolTimeoutUnit) Set the Proxy protocol timeout unit.setReadIdleTimeout(int idleTimeout) Set the read idle timeout, default time unit is seconds.setReceiveBufferSize(int receiveBufferSize) Set the TCP receive buffer sizesetRegisterWebSocketWriteHandlers(boolean registerWebSocketWriteHandlers) Whether write-handlers for server websockets should be registered on theEventBus.setRegisterWriteHandler(boolean registerWriteHandler) Has no effect on HTTP server options.setReuseAddress(boolean reuseAddress) Set the value of reuse addresssetReusePort(boolean reusePort) Set the value of reuse port.setSendBufferSize(int sendBufferSize) Set the TCP send buffer sizesetSni(boolean sni) Set whether the server supports Server Name IndiciationsetSoLinger(int soLinger) Set whether SO_linger keep alive is enabledsetSsl(boolean ssl) Set whether SSL/TLS is enabledsetSslEngineOptions(SSLEngineOptions sslEngineOptions) Set to use SSL engine implementation to use.setSslHandshakeTimeout(long sslHandshakeTimeout) Set the SSL handshake timeout, default time unit is seconds.setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit) Set the SSL handshake timeout unit.setStrictThreadMode(boolean strictThreadMode) Indicates the server that the HTTP request/response interactions will happen exclusively on the expected thread when the threading model is event-loop.setTcpCork(boolean tcpCork) Enable theTCP_CORKoption - only with linux native transport.setTcpFastOpen(boolean tcpFastOpen) Enable theTCP_FASTOPENoption - only with linux native transport.setTcpKeepAlive(boolean tcpKeepAlive) Set whether TCP keep alive is enabledsetTcpNoDelay(boolean tcpNoDelay) Set whether TCP no delay is enabledsetTcpQuickAck(boolean tcpQuickAck) Enable theTCP_QUICKACKoption - only with linux native transport.setTcpUserTimeout(int tcpUserTimeout) Sets theTCP_USER_TIMEOUToption - only with linux native transport.setTracingPolicy(TracingPolicy tracingPolicy) Set the tracing policy for the server behavior when Vert.x has tracing enabled.setTrafficClass(int trafficClass) Set the value of traffic classsetTrafficShapingOptions(TrafficShapingOptions trafficShapingOptions) Set traffic shaping options.setTrustOptions(TrustOptions options) Set the trust options.setUseAlpn(boolean useAlpn) Set the ALPN usage.setUseProxyProtocol(boolean useProxyProtocol) Set whether the server uses the HA Proxy protocolsetWebSocketAllowServerNoContext(boolean accept) Set whether the WebSocket server will accept theserver_no_context_takeoverparameter of the per-message deflate compression extension offered by the client.setWebSocketClosingTimeout(int webSocketClosingTimeout) Set the amount of time a server WebSocket will wait until it closes the TCP connection after sending a close frame.setWebSocketCompressionLevel(int compressionLevel) Set the WebSocket compression level.setWebSocketPreferredClientNoContext(boolean accept) Set whether the WebSocket server will accept theclient_no_context_takeoverparameter of the per-message deflate compression extension offered by the client.setWebSocketSubProtocols(List<String> subProtocols) Set the WebSocket list of sub-protocol supported by the server.setWriteIdleTimeout(int idleTimeout) Set the write idle timeout, default time unit is seconds.toJson()Convert to JSONMethods inherited from class NetServerOptions
getAcceptBacklog, getClientAuth, getHost, getOrCreateSSLOptions, getPort, getProxyProtocolTimeout, getProxyProtocolTimeoutUnit, getSslOptions, getTrafficShapingOptions, isSni, isUseProxyProtocolMethods inherited from class TCPSSLOptions
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getKeyCertOptions, getReadIdleTimeout, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTcpKeepAliveCount, getTcpKeepAliveIdleSeconds, getTcpKeepAliveIntervalSeconds, getTcpUserTimeout, getTrafficClass, getTransportOptions, getTrustOptions, getWriteIdleTimeout, isReuseAddress, isReusePort, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setTcpKeepAliveCount, setTcpKeepAliveIdleSeconds, setTcpKeepAliveIntervalSecondsMethods inherited from class NetworkOptions
getActivityLogDataFormat, getLogActivity
-
Field Details
-
DEFAULT_PORT
public static final int DEFAULT_PORTDefault port the server will listen on = 80- See Also:
-
DEFAULT_COMPRESSION_SUPPORTED
public static final boolean DEFAULT_COMPRESSION_SUPPORTEDDefault value of whether compression is supported =false- See Also:
-
DEFAULT_COMPRESSION_LEVEL
public static final int DEFAULT_COMPRESSION_LEVELDefault gzip/deflate compression level = 6 (Netty legacy)- See Also:
-
DEFAULT_COMPRESSION_CONTENT_SIZE_THRESHOLD
public static final int DEFAULT_COMPRESSION_CONTENT_SIZE_THRESHOLDDefault content size threshold for compression = 0 (Netty default)- See Also:
-
DEFAULT_MAX_WEBSOCKET_FRAME_SIZE
public static final int DEFAULT_MAX_WEBSOCKET_FRAME_SIZEDefault max WebSocket frame size = 65536- See Also:
-
DEFAULT_MAX_WEBSOCKET_MESSAGE_SIZE
public static final int DEFAULT_MAX_WEBSOCKET_MESSAGE_SIZEDefault max WebSocket message size (could be assembled from multiple frames) is 4 full frames worth of data- See Also:
-
DEFAULT_MAX_CHUNK_SIZE
public static final int DEFAULT_MAX_CHUNK_SIZEDefault max HTTP chunk size = 8192- See Also:
-
DEFAULT_MAX_INITIAL_LINE_LENGTH
public static final int DEFAULT_MAX_INITIAL_LINE_LENGTHDefault max length of the initial line (e.g."GET / HTTP/1.0") = 4096- See Also:
-
DEFAULT_MAX_HEADER_SIZE
public static final int DEFAULT_MAX_HEADER_SIZEDefault max length of all headers = 8192- See Also:
-
DEFAULT_MAX_FORM_ATTRIBUTE_SIZE
public static final int DEFAULT_MAX_FORM_ATTRIBUTE_SIZEDefault max size of a form attribute = 8192- See Also:
-
DEFAULT_MAX_FORM_FIELDS
public static final int DEFAULT_MAX_FORM_FIELDSDefault max number of form fields = 256- See Also:
-
DEFAULT_MAX_FORM_BUFFERED_SIZE
public static final int DEFAULT_MAX_FORM_BUFFERED_SIZEDefault max number buffered bytes when decoding a form = 1024- See Also:
-
DEFAULT_HANDLE_100_CONTINE_AUTOMATICALLY
public static final boolean DEFAULT_HANDLE_100_CONTINE_AUTOMATICALLYDefault value of whether 100-Continue should be handled automatically =false- See Also:
-
DEFAULT_ALPN_VERSIONS
Default Application-Layer Protocol Negotiation versions = [HTTP/2,HTTP/1.1] -
DEFAULT_HTTP2_CLEAR_TEXT_ENABLED
public static final boolean DEFAULT_HTTP2_CLEAR_TEXT_ENABLEDDefault H2C is enabled =true- See Also:
-
DEFAULT_INITIAL_SETTINGS_MAX_CONCURRENT_STREAMS
public static final long DEFAULT_INITIAL_SETTINGS_MAX_CONCURRENT_STREAMSThe default initial settings max concurrent stream for an HTTP/2 server = 100- See Also:
-
DEFAULT_HTTP2_CONNECTION_WINDOW_SIZE
public static final int DEFAULT_HTTP2_CONNECTION_WINDOW_SIZEThe default HTTP/2 connection window size = -1- See Also:
-
DEFAULT_DECOMPRESSION_SUPPORTED
public static final boolean DEFAULT_DECOMPRESSION_SUPPORTEDDefault value of whether decompression is supported =false- See Also:
-
DEFAULT_ACCEPT_UNMASKED_FRAMES
public static final boolean DEFAULT_ACCEPT_UNMASKED_FRAMESDefault WebSocket Masked bit is true as depicted by RFC =false- See Also:
-
DEFAULT_DECODER_INITIAL_BUFFER_SIZE
public static final int DEFAULT_DECODER_INITIAL_BUFFER_SIZEDefault initial buffer size for HttpObjectDecoder = 128 bytes- See Also:
-
DEFAULT_PER_FRAME_WEBSOCKET_COMPRESSION_SUPPORTED
public static final boolean DEFAULT_PER_FRAME_WEBSOCKET_COMPRESSION_SUPPORTEDDefault support for WebSockets per-frame deflate compression extension =true- See Also:
-
DEFAULT_PER_MESSAGE_WEBSOCKET_COMPRESSION_SUPPORTED
public static final boolean DEFAULT_PER_MESSAGE_WEBSOCKET_COMPRESSION_SUPPORTEDDefault support for WebSockets per-message deflate compression extension =true- See Also:
-
DEFAULT_WEBSOCKET_COMPRESSION_LEVEL
public static final int DEFAULT_WEBSOCKET_COMPRESSION_LEVELDefault WebSocket deflate compression level = 6- See Also:
-
DEFAULT_WEBSOCKET_ALLOW_SERVER_NO_CONTEXT
public static final boolean DEFAULT_WEBSOCKET_ALLOW_SERVER_NO_CONTEXTDefault allowance of theserver_no_context_takeoverWebSocket parameter deflate compression extension =false- See Also:
-
DEFAULT_WEBSOCKET_PREFERRED_CLIENT_NO_CONTEXT
public static final boolean DEFAULT_WEBSOCKET_PREFERRED_CLIENT_NO_CONTEXTDefault allowance of theclient_no_context_takeoverWebSocket parameter deflate compression extension =false- See Also:
-
DEFAULT_WEBSOCKET_CLOSING_TIMEOUT
public static final int DEFAULT_WEBSOCKET_CLOSING_TIMEOUTDefault WebSocket closing timeout = 10 second)- See Also:
-
DEFAULT_TRACING_POLICY
Default tracing control =TracingPolicy.ALWAYS -
DEFAULT_METRICS_NAME
The default value of the server metrics = "":- See Also:
-
DEFAULT_REGISTER_WEBSOCKET_WRITE_HANDLERS
public static final boolean DEFAULT_REGISTER_WEBSOCKET_WRITE_HANDLERSWhether write-handlers for server websockets should be registered by default = false.- See Also:
-
DEFAULT_HTTP2_RST_FLOOD_MAX_RST_FRAME_PER_WINDOW
public static final int DEFAULT_HTTP2_RST_FLOOD_MAX_RST_FRAME_PER_WINDOWHTTP/2 RST floods DDOS protection, max number of RST frame per time window allowed = 200.- See Also:
-
DEFAULT_HTTP2_RST_FLOOD_WINDOW_DURATION
public static final int DEFAULT_HTTP2_RST_FLOOD_WINDOW_DURATIONHTTP/2 RST floods DDOS protection, time window duration = 30.- See Also:
-
DEFAULT_HTTP2_RST_FLOOD_WINDOW_DURATION_TIME_UNIT
HTTP/2 RST floods DDOS protection, time window duration unit =TimeUnit.SECONDS. -
DEFAULT_HTTP2_MAX_SMALL_CONTINUATION_FRAMES
public static final int DEFAULT_HTTP2_MAX_SMALL_CONTINUATION_FRAMESHTTP/2 maximum allowed number of small continuation frames.- See Also:
-
DEFAULT_STRICT_THREAD_MODE_STRICT
public static final boolean DEFAULT_STRICT_THREAD_MODE_STRICTStrict thread mode = false.- See Also:
-
DEFAULT_HTTP_2_MULTIPLEX_IMPLEMENTATION
public static final boolean DEFAULT_HTTP_2_MULTIPLEX_IMPLEMENTATIONUse HTTP/2 multiplex implementation =false- See Also:
-
-
Constructor Details
-
HttpServerOptions
public HttpServerOptions()Default constructor -
HttpServerOptions
Copy constructor- Parameters:
other- the options to copy
-
HttpServerOptions
-
-
Method Details
-
toJson
Convert to JSON- Overrides:
toJsonin classNetServerOptions- Returns:
- the JSON
-
copy
Copy these options.- Overrides:
copyin classNetServerOptions- Returns:
- a copy of this
-
getHttp1Config
- Returns:
- the configuration specific to the HTTP/1.x protocol.
-
getHttp2Config
- Returns:
- the configuration specific to the HTTP/2 protocol.
-
getWebSocketConfig
- Returns:
- the configuration specific to the WebSocket protocol.
-
createSSLOptions
- Overrides:
createSSLOptionsin classNetServerOptions
-
setSendBufferSize
Description copied from class:NetworkOptionsSet the TCP send buffer size- Overrides:
setSendBufferSizein classNetServerOptions- Parameters:
sendBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
setReceiveBufferSize
Description copied from class:NetworkOptionsSet the TCP receive buffer size- Overrides:
setReceiveBufferSizein classNetServerOptions- Parameters:
receiveBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
setReuseAddress
Description copied from class:NetworkOptionsSet the value of reuse address- Overrides:
setReuseAddressin classNetServerOptions- Parameters:
reuseAddress- the value of reuse address- Returns:
- a reference to this, so the API can be used fluently
-
setReusePort
Description copied from class:NetworkOptionsSet the value of reuse port. This is only supported by native transports.- Overrides:
setReusePortin classNetServerOptions- Parameters:
reusePort- the value of reuse port- Returns:
- a reference to this, so the API can be used fluently
-
setTrafficClass
Description copied from class:NetworkOptionsSet the value of traffic class- Overrides:
setTrafficClassin classNetServerOptions- Parameters:
trafficClass- the value of traffic class- Returns:
- a reference to this, so the API can be used fluently
-
setTcpNoDelay
Description copied from class:TCPSSLOptionsSet whether TCP no delay is enabled- Overrides:
setTcpNoDelayin classNetServerOptions- Parameters:
tcpNoDelay- true if TCP no delay is enabled (Nagle disabled)- Returns:
- a reference to this, so the API can be used fluently
-
setTcpKeepAlive
Description copied from class:TCPSSLOptionsSet whether TCP keep alive is enabled- Overrides:
setTcpKeepAlivein classNetServerOptions- Parameters:
tcpKeepAlive- true if TCP keep alive is enabled- Returns:
- a reference to this, so the API can be used fluently
-
setSoLinger
Description copied from class:TCPSSLOptionsSet whether SO_linger keep alive is enabled- Overrides:
setSoLingerin classNetServerOptions- Parameters:
soLinger- true if SO_linger is enabled- Returns:
- a reference to this, so the API can be used fluently
-
setIdleTimeout
Description copied from class:TCPSSLOptionsSet the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received nor sent within the timeout. If you want change default time unit, useTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)- Overrides:
setIdleTimeoutin classNetServerOptions- Parameters:
idleTimeout- the timeout- Returns:
- a reference to this, so the API can be used fluently
-
setReadIdleTimeout
Description copied from class:TCPSSLOptionsSet the read 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, useTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)- Overrides:
setReadIdleTimeoutin classNetServerOptions- Parameters:
idleTimeout- the read timeout- Returns:
- a reference to this, so the API can be used fluently
-
setWriteIdleTimeout
Description copied from class:TCPSSLOptionsSet the write 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 sent within the timeout. If you want change default time unit, useTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)- Overrides:
setWriteIdleTimeoutin classNetServerOptions- Parameters:
idleTimeout- the write timeout- Returns:
- a reference to this, so the API can be used fluently
-
setIdleTimeoutUnit
Description copied from class:TCPSSLOptionsSet the idle timeout unit. If not specified, default is seconds.- Overrides:
setIdleTimeoutUnitin classNetServerOptions- Parameters:
idleTimeoutUnit- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
-
setSsl
Description copied from class:TCPSSLOptionsSet whether SSL/TLS is enabled- Overrides:
setSslin classNetServerOptions- Parameters:
ssl- true if enabled- Returns:
- a reference to this, so the API can be used fluently
-
setUseAlpn
Description copied from class:TCPSSLOptionsSet the ALPN usage.- Overrides:
setUseAlpnin classNetServerOptions- Parameters:
useAlpn- true when Application-Layer Protocol Negotiation should be used
-
setKeyCertOptions
Description copied from class:TCPSSLOptionsSet the key/cert options.- Overrides:
setKeyCertOptionsin classNetServerOptions- Parameters:
options- the key store options- Returns:
- a reference to this, so the API can be used fluently
-
setTrustOptions
Description copied from class:TCPSSLOptionsSet the trust options.- Overrides:
setTrustOptionsin classNetServerOptions- Parameters:
options- the trust options- Returns:
- a reference to this, so the API can be used fluently
-
addEnabledCipherSuite
Description copied from class:TCPSSLOptionsAdd an enabled cipher suite, appended to the ordered suites.- Overrides:
addEnabledCipherSuitein classNetServerOptions- Parameters:
suite- the suite- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
removeEnabledCipherSuite
Description copied from class:TCPSSLOptionsRemoves an enabled cipher suite from the ordered suites.- Overrides:
removeEnabledCipherSuitein classNetServerOptions- Parameters:
suite- the suite- Returns:
- a reference to this, so the API can be used fluently
-
addEnabledSecureTransportProtocol
Description copied from class:TCPSSLOptionsAdd an enabled SSL/TLS protocols, appended to the ordered protocols.- Overrides:
addEnabledSecureTransportProtocolin classNetServerOptions- Parameters:
protocol- the SSL/TLS protocol to enable- Returns:
- a reference to this, so the API can be used fluently
-
removeEnabledSecureTransportProtocol
Description copied from class:TCPSSLOptionsRemoves an enabled SSL/TLS protocol from the ordered protocols.- Overrides:
removeEnabledSecureTransportProtocolin classNetServerOptions- Parameters:
protocol- the SSL/TLS protocol to disable- Returns:
- a reference to this, so the API can be used fluently
-
setTcpFastOpen
Description copied from class:TCPSSLOptionsEnable theTCP_FASTOPENoption - only with linux native transport.- Overrides:
setTcpFastOpenin classNetServerOptions- Parameters:
tcpFastOpen- the fast open value
-
setTcpCork
Description copied from class:TCPSSLOptionsEnable theTCP_CORKoption - only with linux native transport.- Overrides:
setTcpCorkin classNetServerOptions- Parameters:
tcpCork- the cork value
-
setTcpQuickAck
Description copied from class:TCPSSLOptionsEnable theTCP_QUICKACKoption - only with linux native transport.- Overrides:
setTcpQuickAckin classNetServerOptions- Parameters:
tcpQuickAck- the quick ack value
-
setTcpUserTimeout
Description copied from class:TCPSSLOptionsSets theTCP_USER_TIMEOUToption - only with linux native transport.- Overrides:
setTcpUserTimeoutin classNetServerOptions- Parameters:
tcpUserTimeout- the tcp user timeout value
-
addCrlPath
Description copied from class:TCPSSLOptionsAdd a CRL path- Overrides:
addCrlPathin classNetServerOptions- Parameters:
crlPath- the path- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
addCrlValue
Description copied from class:TCPSSLOptionsAdd a CRL value- Overrides:
addCrlValuein classNetServerOptions- Parameters:
crlValue- the value- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
setAcceptBacklog
Description copied from class:NetServerOptionsSet the accept back log- Overrides:
setAcceptBacklogin classNetServerOptions- Parameters:
acceptBacklog- accept backlog- Returns:
- a reference to this, so the API can be used fluently
-
setPort
Description copied from class:NetServerOptionsSet the port- Overrides:
setPortin classNetServerOptions- Parameters:
port- the port- Returns:
- a reference to this, so the API can be used fluently
-
setHost
Description copied from class:NetServerOptionsSet the host- Overrides:
setHostin classNetServerOptions- Parameters:
host- the host- Returns:
- a reference to this, so the API can be used fluently
-
setClientAuth
Description copied from class:NetServerOptionsSet whether client auth is required- Overrides:
setClientAuthin classNetServerOptions- Parameters:
clientAuth- 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:
- a reference to this, so the API can be used fluently
-
setSslEngineOptions
Description copied from class:TCPSSLOptionsSet to use SSL engine implementation to use.- Overrides:
setSslEngineOptionsin classNetServerOptions- Parameters:
sslEngineOptions- the ssl engine to use- Returns:
- a reference to this, so the API can be used fluently
-
setEnabledSecureTransportProtocols
public HttpServerOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) Description copied from class:TCPSSLOptionsSets the list of enabled SSL/TLS protocols.- Overrides:
setEnabledSecureTransportProtocolsin classNetServerOptions- Parameters:
enabledSecureTransportProtocols- the SSL/TLS protocols to enable- Returns:
- a reference to this, so the API can be used fluently
-
setSslHandshakeTimeout
Description copied from class:TCPSSLOptionsSet the SSL handshake timeout, default time unit is seconds.- Overrides:
setSslHandshakeTimeoutin classNetServerOptions- Parameters:
sslHandshakeTimeout- the SSL handshake timeout to set, in milliseconds- Returns:
- a reference to this, so the API can be used fluently
-
setSslHandshakeTimeoutUnit
Description copied from class:TCPSSLOptionsSet the SSL handshake timeout unit. If not specified, default is seconds.- Overrides:
setSslHandshakeTimeoutUnitin classNetServerOptions- Parameters:
sslHandshakeTimeoutUnit- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
-
isCompressionSupported
public boolean isCompressionSupported()- Returns:
trueif the server supports gzip/deflate compression
-
setCompressionSupported
Set whether the server should support gzip/deflate compression (serving compressed responses to clients advertising support for them with Accept-Encoding header)- Parameters:
compressionSupported-trueto enable compression support- Returns:
- a reference to this, so the API can be used fluently
-
getCompression
- Returns:
- the compression configuration
-
setCompression
Configure the server compression, this overwrites any previously configuration.- Parameters:
compression- the new configuration- Returns:
- a reference to this, so the API can be used fluently
-
getCompressionLevel
public int getCompressionLevel()- Returns:
- the server gzip/deflate 'compression level' to be used in responses when client and server support is turned on
-
setCompressionLevel
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 supportdeflate/gzipcompression in theAccept-Encodingheader 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- Parameters:
compressionLevel- integer 1-9, 1 means use fastest algorithm, 9 slower algorithm but better compression ratio- Returns:
- a reference to this, so the API can be used fluently
-
getCompressionContentSizeThreshold
public int getCompressionContentSizeThreshold()- Returns:
- the compression content size threshold
-
setCompressionContentSizeThreshold
Set the compression content size threshold if compression is enabled. This is only applicable for HTTP/1.x response bodies. If the response content size in bytes is greater than this threshold, then the response is compressed. Otherwise, it is not compressed.- Parameters:
compressionContentSizeThreshold- integer greater than or equal to 0.- Returns:
- a reference to this, so the API can be used fluently
-
getCompressors
- Returns:
- the list of compressor to use
-
addCompressor
Add a compressor.- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
setCompressors
Set the list of compressor to use instead of using the default gzip/deflatesetCompressionLevel(int)configuration.This is only active when
setCompressionSupported(boolean)istrue.- Parameters:
compressors- the list of compressors- Returns:
- a reference to this, so the API can be used fluently
-
isAcceptUnmaskedFrames
public boolean isAcceptUnmaskedFrames() -
setAcceptUnmaskedFrames
Settruewhen the server accepts unmasked frame. As default Server doesn't accept unmasked frame, you can bypass this behaviour (RFC 6455) settingtrue. It's set tofalseas default.- Parameters:
acceptUnmaskedFrames-trueif enabled- Returns:
- a reference to this, so the API can be used fluently
-
getMaxWebSocketFrameSize
public int getMaxWebSocketFrameSize()- Returns:
- the maximum WebSocket frame size
-
setMaxWebSocketFrameSize
Set the maximum WebSocket frames size- Parameters:
maxWebSocketFrameSize- the maximum frame size in bytes.- Returns:
- a reference to this, so the API can be used fluently
-
getMaxWebSocketMessageSize
public int getMaxWebSocketMessageSize()- Returns:
- the maximum WebSocket message size
-
setMaxWebSocketMessageSize
Set the maximum WebSocket message size- Parameters:
maxWebSocketMessageSize- the maximum message size in bytes.- Returns:
- a reference to this, so the API can be used fluently
-
addWebSocketSubProtocol
Add a WebSocket sub-protocol to the list supported by the server.- Parameters:
subProtocol- the sub-protocol to add- Returns:
- a reference to this, so the API can be used fluently
-
setWebSocketSubProtocols
Set the WebSocket list of sub-protocol supported by the server.- Parameters:
subProtocols- comma separated list of sub-protocols- Returns:
- a reference to this, so the API can be used fluently
-
getWebSocketSubProtocols
-
isHandle100ContinueAutomatically
public boolean isHandle100ContinueAutomatically()- Returns:
- whether 100 Continue should be handled automatically
-
setHandle100ContinueAutomatically
Set whether 100 Continue should be handled automatically- Parameters:
handle100ContinueAutomatically-trueif it should be handled automatically- Returns:
- a reference to this, so the API can be used fluently
-
setMaxChunkSize
Set the maximum HTTP chunk size thatHttpServerRequest.handler(Handler)will receive- Parameters:
maxChunkSize- the maximum chunk size- Returns:
- a reference to this, so the API can be used fluently
-
getMaxChunkSize
public int getMaxChunkSize()- Returns:
- the maximum HTTP chunk size that
HttpServerRequest.handler(Handler)will receive
-
getMaxInitialLineLength
public int getMaxInitialLineLength()- Returns:
- the maximum length of the initial line for HTTP/1.x (e.g.
"GET / HTTP/1.0")
-
setMaxInitialLineLength
Set the maximum length of the initial line for HTTP/1.x (e.g."GET / HTTP/1.0")- Parameters:
maxInitialLineLength- the new maximum initial length- Returns:
- a reference to this, so the API can be used fluently
-
getMaxHeaderSize
public int getMaxHeaderSize()- Returns:
- Returns the maximum length of all headers for HTTP/1.x
-
setMaxHeaderSize
Set the maximum length of all headers for HTTP/1.x .- Parameters:
maxHeaderSize- the new maximum length- Returns:
- a reference to this, so the API can be used fluently
-
getMaxFormAttributeSize
public int getMaxFormAttributeSize()- Returns:
- Returns the maximum size of a form attribute
-
setMaxFormAttributeSize
Set the maximum size of a form attribute. Set to-1to allow unlimited length- Parameters:
maxSize- the new maximum size- Returns:
- a reference to this, so the API can be used fluently
-
getMaxFormFields
public int getMaxFormFields()- Returns:
- Returns the maximum number of form fields
-
setMaxFormFields
Set the maximum number of fields of a form. Set to-1to allow unlimited number of attributes- Parameters:
maxFormFields- the new maximum- Returns:
- a reference to this, so the API can be used fluently
-
getMaxFormBufferedBytes
public int getMaxFormBufferedBytes()- Returns:
- Returns the maximum number of bytes a server can buffer when decoding a form
-
setMaxFormBufferedBytes
Set the maximum number of bytes a server can buffer when decoding a form. Set to-1to allow unlimited length- Parameters:
maxFormBufferedBytes- the new maximum- Returns:
- a reference to this, so the API can be used fluently
-
getInitialSettings
- Returns:
- the initial HTTP/2 connection settings
-
setInitialSettings
Set the HTTP/2 connection settings immediatly sent by the server when a client connects.- Parameters:
settings- the settings value- Returns:
- a reference to this, so the API can be used fluently
-
getAlpnVersions
- Returns:
- the list of protocol versions to provide during the Application-Layer Protocol Negotiation
-
setAlpnVersions
Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiation.- Parameters:
alpnVersions- the versions- Returns:
- a reference to this, so the API can be used fluently
-
isHttp2ClearTextEnabled
public boolean isHttp2ClearTextEnabled()- Returns:
- whether the server accepts HTTP/2 over clear text connections
-
setHttp2ClearTextEnabled
Set whether HTTP/2 over clear text is enabled or disabled, default is enabled.- Parameters:
http2ClearTextEnabled- whether to accept HTTP/2 over clear text- Returns:
- a reference to this, so the API can be used fluently
-
getHttp2ConnectionWindowSize
public int getHttp2ConnectionWindowSize()- Returns:
- the default HTTP/2 connection window size
-
setHttp2ConnectionWindowSize
Set the default HTTP/2 connection window size. It overrides the initial window size set byHttp2Settings.getInitialWindowSize(), so the connection window size is greater than for its streams, in order the data throughput. A value of-1reuses the initial window size setting.- Parameters:
http2ConnectionWindowSize- the window size applied to the connection- Returns:
- a reference to this, so the API can be used fluently
-
setLogActivity
Description copied from class:NetworkOptionsSet to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.- Overrides:
setLogActivityin classNetServerOptions- Parameters:
logEnabled- true for logging the network activity- Returns:
- a reference to this, so the API can be used fluently
-
setActivityLogDataFormat
Description copied from class:NetworkOptionsSet the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.- Overrides:
setActivityLogDataFormatin classNetServerOptions- Parameters:
activityLogDataFormat- the format to use- Returns:
- a reference to this, so the API can be used fluently
-
setSni
Description copied from class:NetServerOptionsSet whether the server supports Server Name Indiciation- Overrides:
setSniin classNetServerOptions- Returns:
- a reference to this, so the API can be used fluently
-
setUseProxyProtocol
Description copied from class:NetServerOptionsSet whether the server uses the HA Proxy protocol- Overrides:
setUseProxyProtocolin classNetServerOptions- Returns:
- a reference to this, so the API can be used fluently
-
setProxyProtocolTimeout
Description copied from class:NetServerOptionsSet the Proxy protocol timeout, default time unit is seconds.- Overrides:
setProxyProtocolTimeoutin classNetServerOptions- Parameters:
proxyProtocolTimeout- the Proxy protocol timeout to set- Returns:
- a reference to this, so the API can be used fluently
-
setProxyProtocolTimeoutUnit
Description copied from class:NetServerOptionsSet the Proxy protocol timeout unit. If not specified, default is seconds.- Overrides:
setProxyProtocolTimeoutUnitin classNetServerOptions- Parameters:
proxyProtocolTimeoutUnit- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
-
isDecompressionSupported
public boolean isDecompressionSupported()- Returns:
trueif the server supports decompression
-
setDecompressionSupported
Set whether the server supports decompression- Parameters:
decompressionSupported-trueif decompression supported- Returns:
- a reference to this, so the API can be used fluently
-
getDecoderInitialBufferSize
public int getDecoderInitialBufferSize()- Returns:
- the initial buffer size for the HTTP decoder
-
setDecoderInitialBufferSize
Set the initial buffer size for the HTTP decoder- Parameters:
decoderInitialBufferSize- the initial size- Returns:
- a reference to this, so the API can be used fluently
-
setPerFrameWebSocketCompressionSupported
Enable or disable support for the WebSocket per-frame deflate compression extension.- Parameters:
supported-truewhen the per-frame deflate compression extension is supported- Returns:
- a reference to this, so the API can be used fluently
-
getPerFrameWebSocketCompressionSupported
public boolean getPerFrameWebSocketCompressionSupported()Get whether WebSocket the per-frame deflate compression extension is supported.- Returns:
trueif the http server will accept the per-frame deflate compression extension
-
setPerMessageWebSocketCompressionSupported
Enable or disable support for WebSocket per-message deflate compression extension.- Parameters:
supported-truewhen the per-message WebSocket compression extension is supported- Returns:
- a reference to this, so the API can be used fluently
-
getPerMessageWebSocketCompressionSupported
public boolean getPerMessageWebSocketCompressionSupported()Get whether WebSocket per-message deflate compression extension is supported.- Returns:
trueif the http server will accept the per-message deflate compression extension
-
setWebSocketCompressionLevel
Set the WebSocket compression level.- Parameters:
compressionLevel- the compression level- Returns:
- a reference to this, so the API can be used fluently
-
getWebSocketCompressionLevel
public int getWebSocketCompressionLevel()- Returns:
- the current WebSocket deflate compression level
-
setWebSocketAllowServerNoContext
Set whether the WebSocket server will accept theserver_no_context_takeoverparameter of the per-message deflate compression extension offered by the client.- Parameters:
accept-trueto accept the server_no_context_takeover parameter when the client offers it- Returns:
- a reference to this, so the API can be used fluently
-
getWebSocketAllowServerNoContext
public boolean getWebSocketAllowServerNoContext()- Returns:
truewhen the WebSocket server will accept theserver_no_context_takeoverparameter for the per-message deflate compression extension offered by the client
-
setWebSocketPreferredClientNoContext
Set whether the WebSocket server will accept theclient_no_context_takeoverparameter of the per-message deflate compression extension offered by the client.- Parameters:
accept-trueto accept theclient_no_context_takeoverparameter when the client offers it- Returns:
- a reference to this, so the API can be used fluently
-
getWebSocketPreferredClientNoContext
public boolean getWebSocketPreferredClientNoContext()- Returns:
truewhen the WebSocket server will accept theclient_no_context_takeoverparameter for the per-message deflate compression extension offered by the client
-
getWebSocketClosingTimeout
public int getWebSocketClosingTimeout()- Returns:
- the amount of time (in seconds) a client WebSocket will wait until it closes TCP connection after receiving a close frame
-
setWebSocketClosingTimeout
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
WebSocket.exceptionHandler(Handler)instead of theWebSocket.endHandler(Handler)will be called.Set to
0Lcloses the TCP connection immediately after sending the close frame.Set to a negative value to disable it.
- Parameters:
webSocketClosingTimeout- the timeout is seconds- Returns:
- a reference to this, so the API can be used fluently
-
setTrafficShapingOptions
Description copied from class:NetServerOptionsSet traffic shaping options. If not specified, traffic is unthrottled.- Overrides:
setTrafficShapingOptionsin classNetServerOptions- Parameters:
trafficShapingOptions- options used by traffic handler- Returns:
- a reference to this, so the API can be used fluently
-
getMetricsName
- Returns:
- the metrics name identifying the reported metrics.
-
setMetricsName
Set the metrics name identifying the reported metrics, useful for naming the server metrics.- Parameters:
metricsName- the metrics name- Returns:
- a reference to this, so the API can be used fluently
-
getTracingPolicy
- Returns:
- the tracing policy
-
setTracingPolicy
Set the tracing policy for the server behavior when Vert.x has tracing enabled.- Parameters:
tracingPolicy- the tracing policy- Returns:
- a reference to this, so the API can be used fluently
-
isRegisterWriteHandler
public boolean isRegisterWriteHandler()- Overrides:
isRegisterWriteHandlerin classNetServerOptions- Returns:
false, does not apply to HTTP servers
-
setRegisterWriteHandler
Has no effect on HTTP server options.- Overrides:
setRegisterWriteHandlerin classNetServerOptions- Parameters:
registerWriteHandler- true to register a write-handler- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
isRegisterWebSocketWriteHandlers
public boolean isRegisterWebSocketWriteHandlers()- Returns:
trueif write-handlers for server websockets should be registered on theEventBus, otherwisefalse
-
setRegisterWebSocketWriteHandlers
Whether write-handlers for server websockets should be registered on theEventBus.Defaults to
false.- Parameters:
registerWebSocketWriteHandlers- true to register write-handlers- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
getHttp2RstFloodMaxRstFramePerWindow
public int getHttp2RstFloodMaxRstFramePerWindow()- Returns:
- the max number of RST frame allowed per time window
-
setHttp2RstFloodMaxRstFramePerWindow
public HttpServerOptions setHttp2RstFloodMaxRstFramePerWindow(int http2RstFloodMaxRstFramePerWindow) Set the max number of RST frame allowed per time window, this is used to prevent HTTP/2 RST frame flood DDOS attacks. The default value isDEFAULT_HTTP2_RST_FLOOD_MAX_RST_FRAME_PER_WINDOW, setting zero or a negative value, disables flood protection.- Parameters:
http2RstFloodMaxRstFramePerWindow- the new maximum- Returns:
- a reference to this, so the API can be used fluently
-
getHttp2RstFloodWindowDuration
public int getHttp2RstFloodWindowDuration()- Returns:
- the duration of the time window when checking the max number of RST frames.
-
setHttp2RstFloodWindowDuration
Set the duration of the time window when checking the max number of RST frames, this is used to prevent HTTP/2 RST frame flood DDOS attacks. The default value isDEFAULT_HTTP2_RST_FLOOD_WINDOW_DURATION, setting zero or a negative value, disables flood protection.- Parameters:
http2RstFloodWindowDuration- the new duration- Returns:
- a reference to this, so the API can be used fluently
-
getHttp2RstFloodWindowDurationTimeUnit
- Returns:
- the time unit of the duration of the time window when checking the max number of RST frames.
-
setHttp2RstFloodWindowDurationTimeUnit
public HttpServerOptions setHttp2RstFloodWindowDurationTimeUnit(TimeUnit http2RstFloodWindowDurationTimeUnit) Set the time unit of the duration of the time window when checking the max number of RST frames, this is used to prevent HTTP/2 RST frame flood DDOS attacks. The default value isDEFAULT_HTTP2_RST_FLOOD_WINDOW_DURATION_TIME_UNIT, setting zero or a negative value, disables the flood protection.- Parameters:
http2RstFloodWindowDurationTimeUnit- the new duration- Returns:
- a reference to this, so the API can be used fluently
-
getHttp2MaxSmallContinuationFrames
public int getHttp2MaxSmallContinuationFrames()- Returns:
- the max number of small continuation frame allowed
-
setHttp2MaxSmallContinuationFrames
Set the maximum number of small continuation frames allowed, this is used to prevent flood DoS attack via zero-byte continuation frames. The default value isDEFAULT_HTTP2_MAX_SMALL_CONTINUATION_FRAMES.- Parameters:
http2MaxSmallContinuationFrames- the max number of small continuation frame allowed- Returns:
- a reference to this, so the API can be used fluently
-
isFileRegionEnabled
public boolean isFileRegionEnabled()- Overrides:
isFileRegionEnabledin classNetServerOptions- Returns:
- whether the strict thread mode is used
-
getStrictThreadMode
@Unstable("Experimental") public boolean getStrictThreadMode()- Returns:
- whether to use the strict thread mode.
-
setStrictThreadMode
Indicates the server that the HTTP request/response interactions will happen exclusively on the expected thread when the threading model is event-loop.- Parameters:
strictThreadMode- whether to use the strict thread mode- Returns:
- a reference to this, so the API can be used fluently
-
getHttp2MultiplexImplementation
public boolean getHttp2MultiplexImplementation()- Returns:
- whether to use the HTTP/2 implementation based on multiplexed channel
-
setHttp2MultiplexImplementation
Set which HTTP/2 implementation to use- Parameters:
http2MultiplexImplementation- whether to use the HTTP/2 multiplex implementation- Returns:
- a reference to this, so the API can be used fluently
-