Module io.helidon.webserver.http2
Package io.helidon.webserver.http2
Class Http2Config.BuilderBase<BUILDER extends Http2Config.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http2Config>
java.lang.Object
io.helidon.webserver.http2.Http2Config.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
Http2Config.Builder
- Enclosing interface:
Http2Config
public abstract static class Http2Config.BuilderBase<BUILDER extends Http2Config.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http2Config>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
Http2Config
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconfig()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).Outbound flow control blocking timeout configured asDuration
or text in ISO-8601 format.flowControlTimeout
(Duration flowControlTimeout) Outbound flow control blocking timeout configured asDuration
or text in ISO-8601 format.from
(Http2Config prototype) Update this builder from an existing prototype instance.from
(Http2Config.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.int
This setting indicates the sender's maximum window size in bytes for stream-level flow control.initialWindowSize
(int initialWindowSize) This setting indicates the sender's maximum window size in bytes for stream-level flow control.long
Maximum number of concurrent streams that the server will allow.maxConcurrentStreams
(long maxConcurrentStreams) Maximum number of concurrent streams that the server will allow.int
Maximum number of consecutive empty frames allowed on connection.maxEmptyFrames
(int maxEmptyFrames) Maximum number of consecutive empty frames allowed on connection.int
The size of the largest frame payload that the sender is willing to receive in bytes.maxFrameSize
(int maxFrameSize) The size of the largest frame payload that the sender is willing to receive in bytes.long
The maximum field section size that the sender is prepared to accept in bytes.maxHeaderListSize
(long maxHeaderListSize) The maximum field section size that the sender is prepared to accept in bytes.int
Maximum number of rapid resets(stream RST sent by client before any data have been sent by server).maxRapidResets
(int maxRapidResets) Maximum number of rapid resets(stream RST sent by client before any data have been sent by server).name()
protected void
Handles providers and decorators.Period for counting rapid resets(stream RST sent by client before any data have been sent by server).rapidResetCheckPeriod
(Duration rapidResetCheckPeriod) Period for counting rapid resets(stream RST sent by client before any data have been sent by server).Requested URI discovery settings.requestedUriDiscovery
(RequestedUriDiscoveryContext requestedUriDiscovery) Requested URI discovery settings.Requested URI discovery settings.requestedUriDiscovery
(Supplier<? extends RequestedUriDiscoveryContext> supplier) Requested URI discovery settings.boolean
Whether to send error message over HTTP to client.sendErrorDetails
(boolean sendErrorDetails) Whether to send error message over HTTP to client.toString()
boolean
If set to false, any path is accepted (even containing illegal characters).validatePath
(boolean validatePath) If set to false, any path is accepted (even containing illegal characters).protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends Http2Config.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Http2Config> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
maxFrameSize
The size of the largest frame payload that the sender is willing to receive in bytes. Default value is16384
and maximum value is 224-1 = 16777215 bytes. See RFC 9113 section 6.5.2 for details.- Parameters:
maxFrameSize
- maximal frame size- Returns:
- updated builder instance
- See Also:
-
maxHeaderListSize
The maximum field section size that the sender is prepared to accept in bytes. See RFC 9113 section 6.5.2 for details. Default is 8192.- Parameters:
maxHeaderListSize
- maximal header list size in bytes- Returns:
- updated builder instance
- See Also:
-
maxConcurrentStreams
Maximum number of concurrent streams that the server will allow. Defaults to8192
. This limit is directional: it applies to the number of streams that the sender permits the receiver to create. It is recommended that this value be no smaller than 100 to not unnecessarily limit parallelism See RFC 9113 section 6.5.2 for details.- Parameters:
maxConcurrentStreams
- maximal number of concurrent streams- Returns:
- updated builder instance
- See Also:
-
initialWindowSize
This setting indicates the sender's maximum window size in bytes for stream-level flow control. Default and maximum value is 231-1 = 2147483647 bytes. This setting affects the window size of HTTP/2 connection. Any value greater than 2147483647 causes an error. Any value smaller than initial window size causes an error. See RFC 9113 section 6.9.1 for details.- Parameters:
initialWindowSize
- maximum window size in bytes- Returns:
- updated builder instance
- See Also:
-
flowControlTimeout
Outbound flow control blocking timeout configured asDuration
or text in ISO-8601 format. Blocking timeout defines an interval to wait for the outbound window size changes(incoming window updates) before the next blocking iteration. Default value isPT0.1S
.ISO_8601 format examples: PT0.1S 100 milliseconds PT0.5S 500 milliseconds PT2S 2 seconds - Parameters:
flowControlTimeout
- duration- Returns:
- updated builder instance
- See Also:
-
sendErrorDetails
Whether to send error message over HTTP to client. Defaults tofalse
, as exception message may contain internal information that could be used as an attack vector. Use with care and in cases where both server and clients are under your full control (such as for testing).- Parameters:
sendErrorDetails
- whether to send error messages over the network- Returns:
- updated builder instance
- See Also:
-
rapidResetCheckPeriod
Period for counting rapid resets(stream RST sent by client before any data have been sent by server). Default value isPT10S
.- Parameters:
rapidResetCheckPeriod
- duration- Returns:
- updated builder instance
- See Also:
-
maxRapidResets
Maximum number of rapid resets(stream RST sent by client before any data have been sent by server). When reached withinrapidResetCheckPeriod()
, GOAWAY is sent to client and connection is closed. Default value is100
.- Parameters:
maxRapidResets
- maximum number of rapid resets- Returns:
- updated builder instance
- See Also:
-
maxEmptyFrames
Maximum number of consecutive empty frames allowed on connection.- Parameters:
maxEmptyFrames
- max number of consecutive empty frames- Returns:
- updated builder instance
- See Also:
-
validatePath
If set to false, any path is accepted (even containing illegal characters).- Parameters:
validatePath
- whether to validate path- Returns:
- updated builder instance
- See Also:
-
requestedUriDiscovery
Requested URI discovery settings.- Parameters:
requestedUriDiscovery
- settings for computing the requested URI- Returns:
- updated builder instance
- See Also:
-
requestedUriDiscovery
Requested URI discovery settings.- Parameters:
consumer
- consumer of builder for settings for computing the requested URI- Returns:
- updated builder instance
- See Also:
-
requestedUriDiscovery
Requested URI discovery settings.- Parameters:
supplier
- supplier of settings for computing the requested URI- Returns:
- updated builder instance
- See Also:
-
name
- Parameters:
name
-- Returns:
- updated builder instance
- See Also:
-
maxFrameSize
public int maxFrameSize()The size of the largest frame payload that the sender is willing to receive in bytes. Default value is16384
and maximum value is 224-1 = 16777215 bytes. See RFC 9113 section 6.5.2 for details.- Returns:
- the max frame size
-
maxHeaderListSize
public long maxHeaderListSize()The maximum field section size that the sender is prepared to accept in bytes. See RFC 9113 section 6.5.2 for details. Default is 8192.- Returns:
- the max header list size
-
maxConcurrentStreams
public long maxConcurrentStreams()Maximum number of concurrent streams that the server will allow. Defaults to8192
. This limit is directional: it applies to the number of streams that the sender permits the receiver to create. It is recommended that this value be no smaller than 100 to not unnecessarily limit parallelism See RFC 9113 section 6.5.2 for details.- Returns:
- the max concurrent streams
-
initialWindowSize
public int initialWindowSize()This setting indicates the sender's maximum window size in bytes for stream-level flow control. Default and maximum value is 231-1 = 2147483647 bytes. This setting affects the window size of HTTP/2 connection. Any value greater than 2147483647 causes an error. Any value smaller than initial window size causes an error. See RFC 9113 section 6.9.1 for details.- Returns:
- the initial window size
-
flowControlTimeout
Outbound flow control blocking timeout configured asDuration
or text in ISO-8601 format. Blocking timeout defines an interval to wait for the outbound window size changes(incoming window updates) before the next blocking iteration. Default value isPT0.1S
.ISO_8601 format examples: PT0.1S 100 milliseconds PT0.5S 500 milliseconds PT2S 2 seconds - Returns:
- the flow control timeout
- See Also:
-
sendErrorDetails
public boolean sendErrorDetails()Whether to send error message over HTTP to client. Defaults tofalse
, as exception message may contain internal information that could be used as an attack vector. Use with care and in cases where both server and clients are under your full control (such as for testing).- Returns:
- the send error details
-
rapidResetCheckPeriod
Period for counting rapid resets(stream RST sent by client before any data have been sent by server). Default value isPT10S
.- Returns:
- the rapid reset check period
- See Also:
-
maxRapidResets
public int maxRapidResets()Maximum number of rapid resets(stream RST sent by client before any data have been sent by server). When reached withinrapidResetCheckPeriod()
, GOAWAY is sent to client and connection is closed. Default value is100
.- Returns:
- the max rapid resets
- See Also:
-
maxEmptyFrames
public int maxEmptyFrames()Maximum number of consecutive empty frames allowed on connection.- Returns:
- the max empty frames
-
validatePath
public boolean validatePath()If set to false, any path is accepted (even containing illegal characters).- Returns:
- the validate path
-
requestedUriDiscovery
Requested URI discovery settings.- Returns:
- the requested uri discovery
-
name
- Returns:
- the name
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-