Module io.helidon.webclient.http2
Package io.helidon.webclient.http2
Class Http2ClientProtocolConfig.BuilderBase<BUILDER extends Http2ClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http2ClientProtocolConfig>
java.lang.Object
io.helidon.webclient.http2.Http2ClientProtocolConfig.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:
Http2ClientProtocolConfig.Builder
- Enclosing interface:
Http2ClientProtocolConfig
public abstract static class Http2ClientProtocolConfig.BuilderBase<BUILDER extends Http2ClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http2ClientProtocolConfig>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
Http2ClientProtocolConfig
.-
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).Timeout for blocking between windows size check iterations.flowControlBlockTimeout
(Duration flowControlBlockTimeout) Timeout for blocking between windows size check iterations.from
(Http2ClientProtocolConfig prototype) Update this builder from an existing prototype instance.from
(Http2ClientProtocolConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.int
Configure INITIAL_WINDOW_SIZE setting for new HTTP/2 connections.initialWindowSize
(int initialWindowSize) Configure INITIAL_WINDOW_SIZE setting for new HTTP/2 connections.int
Configure initial MAX_FRAME_SIZE setting for new HTTP/2 connections.maxFrameSize
(int maxFrameSize) Configure initial MAX_FRAME_SIZE setting for new HTTP/2 connections.long
Configure initial MAX_HEADER_LIST_SIZE setting for new HTTP/2 connections.maxHeaderListSize
(long maxHeaderListSize) Configure initial MAX_HEADER_LIST_SIZE setting for new HTTP/2 connections.name()
boolean
ping()
Check healthiness of cached connections with HTTP/2.0 ping frame.ping
(boolean ping) Check healthiness of cached connections with HTTP/2.0 ping frame.Timeout for ping probe used for checking healthiness of cached connections.pingTimeout
(Duration pingTimeout) Timeout for ping probe used for checking healthiness of cached connections.protected void
Handles providers and decorators.boolean
Prior knowledge of HTTP/2 capabilities of the server.priorKnowledge
(boolean priorKnowledge) Prior knowledge of HTTP/2 capabilities of the server.toString()
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 Http2ClientProtocolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Http2ClientProtocolConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
name
- Parameters:
name
-- Returns:
- updated builder instance
- See Also:
-
priorKnowledge
Prior knowledge of HTTP/2 capabilities of the server. If server we are connecting to does not support HTTP/2 and prior knowledge is set tofalse
, only features supported by HTTP/1 will be available and attempts to use HTTP/2 specific will throw anUnsupportedOperationException
.Plain text connection
If prior knowledge is set totrue
, we will not attempt an upgrade of connection and use prior knowledge. If prior knowledge is set tofalse
, we will initiate an HTTP/1 connection and upgrade it to HTTP/2, if supported by the server. plaintext connection (h2c
).TLS protected connection
If prior knowledge is set totrue
, we will negotiate protocol using HTTP/2 only, failing if not supported. if prior knowledge is set tofalse
, we will negotiate protocol using both HTTP/2 and HTTP/1, using the protocol supported by server.- Parameters:
priorKnowledge
- whether to use prior knowledge of HTTP/2- Returns:
- updated builder instance
- See Also:
-
maxFrameSize
Configure initial MAX_FRAME_SIZE setting for new HTTP/2 connections. Maximum size of data frames in bytes the client is prepared to accept from the server. Default value is 2^14(16_384).- Parameters:
maxFrameSize
- data frame size in bytes between 2^14(16_384) and 2^24-1(16_777_215)- Returns:
- updated builder instance
- See Also:
-
maxHeaderListSize
Configure initial MAX_HEADER_LIST_SIZE setting for new HTTP/2 connections. Sends to the server the maximum header field section size client is prepared to accept. Defaults to-1
, which means "unconfigured".- Parameters:
maxHeaderListSize
- units of octets- Returns:
- updated builder instance
- See Also:
-
initialWindowSize
Configure INITIAL_WINDOW_SIZE setting for new HTTP/2 connections. Sends to the server the size of the largest frame payload client is willing to receive. Defaults to 65535.- Parameters:
initialWindowSize
- units of octets- Returns:
- updated builder instance
- See Also:
-
flowControlBlockTimeout
Timeout for blocking between windows size check iterations.- Parameters:
flowControlBlockTimeout
- timeout- Returns:
- updated builder instance
- See Also:
-
ping
Check healthiness of cached connections with HTTP/2.0 ping frame. Defaults tofalse
.- Parameters:
ping
- use ping if true- Returns:
- updated builder instance
- See Also:
-
pingTimeout
Timeout for ping probe used for checking healthiness of cached connections. Defaults toPT0.5S
, which means 500 milliseconds.- Parameters:
pingTimeout
- timeout- Returns:
- updated builder instance
- See Also:
-
name
- Returns:
- the name
-
priorKnowledge
public boolean priorKnowledge()Prior knowledge of HTTP/2 capabilities of the server. If server we are connecting to does not support HTTP/2 and prior knowledge is set tofalse
, only features supported by HTTP/1 will be available and attempts to use HTTP/2 specific will throw anUnsupportedOperationException
.Plain text connection
If prior knowledge is set totrue
, we will not attempt an upgrade of connection and use prior knowledge. If prior knowledge is set tofalse
, we will initiate an HTTP/1 connection and upgrade it to HTTP/2, if supported by the server. plaintext connection (h2c
).TLS protected connection
If prior knowledge is set totrue
, we will negotiate protocol using HTTP/2 only, failing if not supported. if prior knowledge is set tofalse
, we will negotiate protocol using both HTTP/2 and HTTP/1, using the protocol supported by server.- Returns:
- the prior knowledge
-
maxFrameSize
public int maxFrameSize()Configure initial MAX_FRAME_SIZE setting for new HTTP/2 connections. Maximum size of data frames in bytes the client is prepared to accept from the server. Default value is 2^14(16_384).- Returns:
- the max frame size
-
maxHeaderListSize
public long maxHeaderListSize()Configure initial MAX_HEADER_LIST_SIZE setting for new HTTP/2 connections. Sends to the server the maximum header field section size client is prepared to accept. Defaults to-1
, which means "unconfigured".- Returns:
- the max header list size
-
initialWindowSize
public int initialWindowSize()Configure INITIAL_WINDOW_SIZE setting for new HTTP/2 connections. Sends to the server the size of the largest frame payload client is willing to receive. Defaults to 65535.- Returns:
- the initial window size
-
flowControlBlockTimeout
Timeout for blocking between windows size check iterations.- Returns:
- the flow control block timeout
-
ping
public boolean ping()Check healthiness of cached connections with HTTP/2.0 ping frame. Defaults tofalse
.- Returns:
- the ping
-
pingTimeout
Timeout for ping probe used for checking healthiness of cached connections. Defaults toPT0.5S
, which means 500 milliseconds.- Returns:
- the ping timeout
-
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.
-