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
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enumValues to indicate what kind of websocket support should be offered. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf unset, defaults to permitting "GET", "POST", and "OPTIONS" methods, ensuring that gRPC calls and requests to load the web client are permitted.static JettyConfig.Builderbuilder()static JettyConfig.BuilderbuildFromConfig(Configuration config) Parses the configuration values into the appropriate builder methods viaServerConfig.buildFromConfig(ServerConfig.Builder, Configuration).static JettyConfigThe default configuration is suitable for local development purposes.Extra headers to return in every response from this server.abstract Booleanhttp1()Include HTTP/1.1.final booleanReturnshttp1()if explicitly set.abstract OptionalLonglongHow long can a stream be idle in milliseconds before it should be shut down.abstract BooleanInclude HTTP compression.final booleanReturnshttpCompression()if explicitly set, otherwise returnstrue.abstract OptionalIntIf unset, uses Jetty's default (presently 128).abstract OptionalIntValue is in bytes.intport()The port.booleanInclude sniHostCheck.abstract JettyConfig.WebsocketsSupportInclude websockets.Returnswebsockets()if explicitly set.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
-
ALLOWED_HTTP_METHODS
- See Also:
-
DEFAULT_ALLOWED_METHODS
-
EXTRA_HEADERS
- 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:
portin 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 totruewhenServerConfig.ssl()is empty, andfalsewhenServerConfig.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. -
allowedHttpMethods
If unset, defaults to permitting "GET", "POST", and "OPTIONS" methods, ensuring that gRPC calls and requests to load the web client are permitted. -
extraHeaders
Extra headers to return in every response from this server.
-