public class Http2ConfigBuilder extends Object
MuServerBuilder.withHttp2Config(Http2ConfigBuilder)
Constructor and Description |
---|
Http2ConfigBuilder() |
Modifier and Type | Method and Description |
---|---|
Http2Config |
build()
Creates the HTTP2 settings object
|
Http2ConfigBuilder |
enabled(boolean enabled)
Specifies whether to enable HTTP2 or not.
|
static Http2ConfigBuilder |
http2Config()
Creates a new config where HTTP2 is disabled
|
static Http2ConfigBuilder |
http2Enabled()
Creates a new config where HTTP2 is enabled
|
static Http2ConfigBuilder |
http2EnabledIfAvailable()
Creates a new config where HTTP2 is enabled if supported by the Java version.
|
public Http2ConfigBuilder enabled(boolean enabled)
enabled
- true
to enable; false
to disable.public Http2Config build()
public static Http2ConfigBuilder http2Config()
public static Http2ConfigBuilder http2Enabled()
public static Http2ConfigBuilder http2EnabledIfAvailable()
Creates a new config where HTTP2 is enabled if supported by the Java version.
The current logic may not always return the correct results. It does not actually test for availability and instead tries to detect the Java version, and enables HTTP2 for Java 9 or later.
Copyright © 2017–2019. All rights reserved.