Package io.helidon.nima.http2.webclient
Class Http2Client.Http2ClientBuilder
java.lang.Object
io.helidon.nima.webclient.WebClient.Builder<Http2Client.Http2ClientBuilder,Http2Client>
io.helidon.nima.http2.webclient.Http2Client.Http2ClientBuilder
- All Implemented Interfaces:
Builder<Http2Client.Http2ClientBuilder,,Http2Client> Supplier<Http2Client>
- Enclosing interface:
Http2Client
public static class Http2Client.Http2ClientBuilder
extends WebClient.Builder<Http2Client.Http2ClientBuilder,Http2Client>
Fluent API builder for
Http2Client.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.initialWindowSize(int initialWindowSize) Configure INITIAL_WINDOW_SIZE setting for new HTTP/2 connections.maxFrameSize(int maxFrameSize) Configure initial MAX_FRAME_SIZE setting for new HTTP/2 connections.maxHeaderListSize(long maxHeaderListSize) Configure initial MAX_HEADER_LIST_SIZE setting for new HTTP/2 connections.prefetch(int prefetch) First connection window update increment sent right after the connection is established.priorKnowledge(boolean priorKnowledge) Prior knowledge of HTTP/2 capabilities of the server.Methods inherited from class io.helidon.nima.webclient.WebClient.Builder
baseUri, baseUri, channelOptions, dnsAddressLookup, dnsResolver, tls, tls
-
Method Details
-
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 client
-
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 client
-
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.- Parameters:
maxHeaderListSize- units of octets- Returns:
- updated client
-
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.- Parameters:
initialWindowSize- units of octets- Returns:
- updated client
-
prefetch
First connection window update increment sent right after the connection is established.- Parameters:
prefetch- number of bytes the client is prepared to receive as data from all the streams combined- Returns:
- updated client
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Returns:
- instance of the built type
-