java.lang.Object
io.helidon.webclient.http2.Http2ClientImpl
- All Implemented Interfaces:
- RuntimeType.Api<Http2ClientConfig>,- HttpClient<Http2ClientRequest>,- ReleasableResource,- Http2Client,- HttpClientSpi
Implementation of HTTP2 client.
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.helidon.webclient.spi.HttpClientSpiHttpClientSpi.SupportLevel
- 
Field SummaryFields inherited from interface io.helidon.webclient.http2.Http2ClientPROTOCOL, PROTOCOL_ID
- 
Method SummaryModifier and TypeMethodDescriptionclientRequest(FullClientRequest<?> clientRequest, ClientUri clientUri) Create a client request based on the provided HTTP request that is for the version of this client.voidGracefully close all opened client specific connections.Create a request for a method.The prototype as it was received when creating this runtime object instance.supports(FullClientRequest<?> clientRequest, ClientUri clientUri) Return whether this HTTP version can handle the provided request.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.webclient.api.HttpClientdelete, delete, get, get, head, head, options, options, patch, patch, post, post, put, put, trace, traceMethods inherited from interface io.helidon.webclient.spi.HttpClientSpiisTcpMethods inherited from interface io.helidon.webclient.api.ReleasableResourcereleaseResource
- 
Method Details- 
methodDescription copied from interface:HttpClientCreate a request for a method.- Specified by:
- methodin interface- HttpClient<Http2ClientRequest>
- Parameters:
- method- HTTP method
- Returns:
- a new request (not thread safe)
 
- 
prototypeDescription copied from interface:RuntimeType.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
- prototypein interface- RuntimeType.Api<Http2ClientConfig>
- Returns:
- prototype object used to create this instance
 
- 
supportsDescription copied from interface:HttpClientSpiReturn whether this HTTP version can handle the provided request.Examples: - HTTP/1.1 always returns true, as it is the fallback protocol of all other protocols
- HTTP/2 returns true when upgrade is enabled, false when prior-knowledge is specified (as we can always attempt to upgrade and fallback to 1.1 in the first case, but we would fail with prior-knowledge, unless the endpoint is known to be HTTP/2
- HTTP/3 would always return true, as it cannot fallback once a connection is attempted
 - An explicit protocol id is configured for the request -
     HttpClientRequest.protocolId(String)
- There is no fallback protocol enabled, in such a case, we use the one with highest priority - see
     WebClientConfig.BuilderBase.addProtocolPreference(String)
- We get an Alt-Svcheader from a response that points us to a protocol version (we only support permanent protocol changes,Alt-Svcwith timeout will be ignored
- This protocol version already handled a request to such an endpoint and has the connection available
 - Specified by:
- supportsin interface- HttpClientSpi
- Parameters:
- clientRequest- HTTP request
- clientUri- URI to invoke
- Returns:
- trueif we are sure we can handle this request with this protocol version
 
- 
clientRequestDescription copied from interface:HttpClientSpiCreate a client request based on the provided HTTP request that is for the version of this client.- Specified by:
- clientRequestin interface- HttpClientSpi
- Parameters:
- clientRequest- request configuration
- clientUri- URI to invoke (resolved)
- Returns:
- a new request
 
- 
closeResourcepublic void closeResource()Description copied from interface:HttpClientGracefully close all opened client specific connections.- Specified by:
- closeResourcein interface- HttpClient<Http2ClientRequest>
- Specified by:
- closeResourcein interface- ReleasableResource
 
 
-