Package io.deephaven.server.jetty
Class JettyConfig
- java.lang.Object
-
- io.deephaven.server.jetty.JettyConfig
-
- All Implemented Interfaces:
io.deephaven.server.config.ServerConfig
@Immutable public abstract class JettyConfig extends java.lang.Object implements io.deephaven.server.config.ServerConfigThe jetty server configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceJettyConfig.Builderstatic classJettyConfig.WebsocketsSupportValues to indicate what kind of websocket support should be offered.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PLAINTEXT_PORTstatic intDEFAULT_SSL_PORTstatic java.lang.StringHTTP_COMPRESSIONstatic java.lang.StringHTTP_HTTP1static java.lang.StringHTTP_STREAM_TIMEOUTstatic java.lang.StringHTTP_WEBSOCKETSstatic java.lang.StringSNI_HOST_CHECK
-
Constructor Summary
Constructors Constructor Description JettyConfig()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static JettyConfig.Builderbuilder()static JettyConfig.BuilderbuildFromConfig(io.deephaven.configuration.Configuration config)Parses the configuration values into the appropriate builder methods viaServerConfig.buildFromConfig(ServerConfig.Builder, Configuration).static JettyConfigdefaultConfig()The default configuration is suitable for local development purposes.abstract java.lang.Booleanhttp1()Include HTTP/1.1.booleanhttp1OrDefault()Returnshttp1()if explicitly set.abstract java.util.OptionalLonghttp2StreamIdleTimeout()longhttp2StreamIdleTimeoutOrDefault()How long can a stream be idle in milliseconds before it should be shut down.abstract java.lang.BooleanhttpCompression()Include HTTP compression.booleanhttpCompressionOrDefault()ReturnshttpCompression()if explicitly set, otherwise returnstrue.intport()The port.booleansniHostCheck()Include sniHostCheck.abstract JettyConfig.WebsocketsSupportwebsockets()Include websockets.JettyConfig.WebsocketsSupportwebsocketsOrDefault()Returnswebsockets()if explicitly set.
-
-
-
Field Detail
-
DEFAULT_SSL_PORT
public static final int DEFAULT_SSL_PORT
- See Also:
- Constant Field Values
-
DEFAULT_PLAINTEXT_PORT
public static final int DEFAULT_PLAINTEXT_PORT
- See Also:
- Constant Field Values
-
HTTP_WEBSOCKETS
public static final java.lang.String HTTP_WEBSOCKETS
- See Also:
- Constant Field Values
-
HTTP_HTTP1
public static final java.lang.String HTTP_HTTP1
- See Also:
- Constant Field Values
-
HTTP_STREAM_TIMEOUT
public static final java.lang.String HTTP_STREAM_TIMEOUT
- See Also:
- Constant Field Values
-
HTTP_COMPRESSION
public static final java.lang.String HTTP_COMPRESSION
- See Also:
- Constant Field Values
-
SNI_HOST_CHECK
public static final java.lang.String SNI_HOST_CHECK
- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
public static JettyConfig.Builder builder()
-
defaultConfig
public static JettyConfig 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
public static JettyConfig.Builder buildFromConfig(io.deephaven.configuration.Configuration config)
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 interfaceio.deephaven.server.config.ServerConfig
-
websockets
@Nullable public abstract JettyConfig.WebsocketsSupport websockets()
Include websockets.
-
http1
@Nullable public abstract java.lang.Boolean http1()
Include HTTP/1.1.
-
sniHostCheck
@Default public boolean sniHostCheck()
Include sniHostCheck.
-
http2StreamIdleTimeout
public abstract java.util.OptionalLong http2StreamIdleTimeout()
-
httpCompression
@Nullable public abstract java.lang.Boolean 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
public final JettyConfig.WebsocketsSupport websocketsOrDefault()
Returnswebsockets()if explicitly set. IfServerConfig.proxyHint()istrue, returnsfalse. Otherwise, defaults totruewhenServerConfig.ssl()is empty, andfalsewhenServerConfig.ssl()is present.
-
http1OrDefault
public final boolean http1OrDefault()
-
httpCompressionOrDefault
public final boolean httpCompressionOrDefault()
ReturnshttpCompression()if explicitly set, otherwise returnstrue.
-
-