Package io.deephaven.server.jetty
Class JettyConfig
java.lang.Object
io.deephaven.server.jetty.JettyConfig
- All Implemented Interfaces:
ServerConfig
The jetty server configuration.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static enum
Values to indicate what kind of websocket support should be offered. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface io.deephaven.server.config.ServerConfig
DEFAULT_MAX_INBOUND_MESSAGE_SIZE_MiB, DEFAULT_SCHEDULER_POOL_SIZE, DEFAULT_SHUTDOWN_TIMEOUT_MILLIS, GRPC_MAX_INBOUND_MESSAGE_SIZE, HTTP_HOST, HTTP_PORT, HTTP_SESSION_DURATION_MS, HTTP_TARGET_URL, PROXY_HINT, SCHEDULER_POOL_SIZE, SHUTDOWN_TIMEOUT_MILLIS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JettyConfig.Builder
builder()
static JettyConfig.Builder
buildFromConfig
(Configuration config) Parses the configuration values into the appropriate builder methods viaServerConfig.buildFromConfig(ServerConfig.Builder, Configuration)
.static JettyConfig
The default configuration is suitable for local development purposes.abstract Boolean
http1()
Include HTTP/1.1.final boolean
Returnshttp1()
if explicitly set.abstract OptionalLong
long
How long can a stream be idle in milliseconds before it should be shut down.abstract Boolean
Include HTTP compression.final boolean
ReturnshttpCompression()
if explicitly set, otherwise returnstrue
.abstract OptionalInt
If unset, uses Jetty's default (presently 128).abstract OptionalInt
Value is in bytes.int
port()
The port.boolean
Include sniHostCheck.abstract JettyConfig.WebsocketsSupport
Include websockets.Returnswebsockets()
if explicitly set.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.server.config.ServerConfig
host, maxInboundMessageSize, outboundSsl, proxyHint, schedulerPoolSize, shutdownTimeout, ssl, targetUrl, targetUrlOrDefault, tokenExpire
-
Field Details
-
DEFAULT_SSL_PORT
public static final int DEFAULT_SSL_PORT- See Also:
-
DEFAULT_PLAINTEXT_PORT
public static final int DEFAULT_PLAINTEXT_PORT- See Also:
-
HTTP_WEBSOCKETS
- See Also:
-
HTTP_HTTP1
- See Also:
-
HTTP_STREAM_TIMEOUT
- See Also:
-
HTTP_COMPRESSION
- See Also:
-
SNI_HOST_CHECK
- See Also:
-
MAX_CONCURRENT_STREAMS
- See Also:
-
MAX_HEADER_REQUEST_SIZE
- See Also:
-
-
Constructor Details
-
JettyConfig
public JettyConfig()
-
-
Method Details
-
builder
-
defaultConfig
The default configuration is suitable for local development purposes. It inherits all of the defaults, which are documented on each individual method. In brief, the default server starts up on all interfaces with plaintext port 10000, a scheduler pool size of 4, and a max inbound message size of 100 MiB. -
buildFromConfig
Parses the configuration values into the appropriate builder methods viaServerConfig.buildFromConfig(ServerConfig.Builder, Configuration)
.Additionally, parses the property "http.websockets" into
JettyConfig.Builder.websockets(WebsocketsSupport)
, "http.http1" intoJettyConfig.Builder.http1(Boolean)
, "http2.stream.idleTimeoutMs" intoJettyConfig.Builder.http2StreamIdleTimeout(long)
, and "http.compression" intoJettyConfig.Builder.httpCompression(Boolean)
- Parameters:
config
- the config- Returns:
- the builder
-
port
@Default public int port()- Specified by:
port
in interfaceServerConfig
-
websockets
Include websockets. -
http1
Include HTTP/1.1. -
sniHostCheck
@Default public boolean sniHostCheck()Include sniHostCheck. -
http2StreamIdleTimeout
-
httpCompression
Include HTTP compression. -
http2StreamIdleTimeoutOrDefault
public long http2StreamIdleTimeoutOrDefault()How long can a stream be idle in milliseconds before it should be shut down. Non-positive values disable this feature. Default is zero. -
websocketsOrDefault
Returnswebsockets()
if explicitly set. IfServerConfig.proxyHint()
istrue
, returnsfalse
. Otherwise, defaults totrue
whenServerConfig.ssl()
is empty, andfalse
whenServerConfig.ssl()
is present. -
http1OrDefault
public final boolean http1OrDefault()Returnshttp1()
if explicitly set. IfServerConfig.proxyHint()
istrue
, returnsfalse
. Otherwise, defaults totrue
. This may become more strict in the future, see #2787). -
httpCompressionOrDefault
public final boolean httpCompressionOrDefault()ReturnshttpCompression()
if explicitly set, otherwise returnstrue
. -
maxHeaderRequestSize
Value is in bytes. If unset, uses Jetty's default (presently 8192). -
maxConcurrentStreams
If unset, uses Jetty's default (presently 128). Only applies to http2 connections.
-