Module io.helidon.webclient.http1
Package io.helidon.webclient.http1
Class Http1ClientConfig.BuilderBase.Http1ClientConfigImpl
java.lang.Object
io.helidon.webclient.api.HttpConfigBase.BuilderBase.HttpConfigBaseImpl
io.helidon.webclient.api.HttpClientConfig.BuilderBase.HttpClientConfigImpl
io.helidon.webclient.http1.Http1ClientConfig.BuilderBase.Http1ClientConfigImpl
- All Implemented Interfaces:
Prototype.Api
,Prototype.Factory<Http1Client>
,HttpClientConfig
,HttpConfigBase
,Http1ClientConfig
,Supplier<Http1Client>
- Enclosing class:
Http1ClientConfig.BuilderBase<BUILDER extends Http1ClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Http1ClientConfig>
protected static class Http1ClientConfig.BuilderBase.Http1ClientConfigImpl
extends HttpClientConfig.BuilderBase.HttpClientConfigImpl
implements Http1ClientConfig, Supplier<Http1Client>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webclient.http1.Http1ClientConfig
Http1ClientConfig.Builder, Http1ClientConfig.BuilderBase<BUILDER extends Http1ClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Http1ClientConfig> Nested classes/interfaces inherited from interface io.helidon.webclient.api.HttpClientConfig
HttpClientConfig.Builder, HttpClientConfig.BuilderBase<BUILDER extends HttpClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends HttpClientConfig> Nested classes/interfaces inherited from interface io.helidon.webclient.api.HttpConfigBase
HttpConfigBase.Builder, HttpConfigBase.BuilderBase<BUILDER extends HttpConfigBase.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends HttpConfigBase> -
Constructor Summary
ModifierConstructorDescriptionprotected
Http1ClientConfigImpl
(Http1ClientConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionBase fragment used by the client in all requests (unless overwritten on per-request basis).Base query used by the client in all requests.baseUri()
Base uri used by the client in all requests.build()
Create a new instance of the runtime type from this config object.int
Maximal size of the connection cache.Connect timeout.Configure the listener specificContentEncodingContext
.WebClient cookie manager.Default headers to be used in every request from configuration.default ClientRequestHeaders
Default headers as a headers object.DNS address lookup preferences to be used by this client.DNS resolver to be used by this client.boolean
executor()
Client executor service.boolean
Whether to follow redirects.get()
int
hashCode()
headers()
Default headers to be used in every request.boolean
Determines if connection keep alive is enabled (NOT socket keep alive, but HTTP connection keep alive, to re-use the same connection for multiple requests).int
If the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance.int
Max number of followed redirects.Configure the listener specificMediaContext
.Media supports (manually added).Configure media type parsing mode for HTTPContent-Type
header.Properties configured for this client.proxy()
Proxy configuration to be used for requests.Socket 100-Continue read timeout.Read timeout.boolean
Can be set totrue
to force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.boolean
Whether Expect-100-Continue header is sent to verify server availability before sending an entity.services()
WebClient services.boolean
Whether to share connection cache between all the WebClient instances in JVM.Socket options for connections opened by this client.tls()
TLS configuration for any TLS request from this client.toString()
Methods inherited from class io.helidon.webclient.api.HttpClientConfig.BuilderBase.HttpClientConfigImpl
baseFragment, baseQuery, baseUri, connectionCacheSize, contentEncoding, cookieManager, defaultHeadersMap, dnsAddressLookup, dnsResolver, executor, headers, maxInMemoryEntity, mediaContext, mediaSupports, mediaTypeParserMode, readContinueTimeout, relativeUris, sendExpectContinue, services, shareConnectionCache, socketOptions
Methods inherited from class io.helidon.webclient.api.HttpConfigBase.BuilderBase.HttpConfigBaseImpl
connectTimeout, followRedirects, keepAlive, maxRedirects, properties, proxy, readTimeout, tls
-
Constructor Details
-
Http1ClientConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.Factory
Create a new instance of the runtime type from this config object.- Specified by:
build
in interfacePrototype.Factory<Http1Client>
- Returns:
- new configured runtime instance
-
get
- Specified by:
get
in interfaceSupplier<Http1Client>
-
protocolConfig
-
toString
- Overrides:
toString
in classHttpClientConfig.BuilderBase.HttpClientConfigImpl
-
equals
- Overrides:
equals
in classHttpClientConfig.BuilderBase.HttpClientConfigImpl
-
hashCode
public int hashCode()- Overrides:
hashCode
in classHttpClientConfig.BuilderBase.HttpClientConfigImpl
-
baseUri
Base uri used by the client in all requests.- Returns:
- base uri of the client requests
-
baseQuery
Base query used by the client in all requests.- Returns:
- base query of the client requests
-
baseFragment
Optional<UriFragment> baseFragment()Base fragment used by the client in all requests (unless overwritten on per-request basis).- Returns:
- fragment to use
-
socketOptions
SocketOptions socketOptions()Socket options for connections opened by this client. If there is a value explicitly configured on this type and on the socket options, the one configured on this type's builder will win:- Returns:
- socket options
-
dnsResolver
DnsResolver dnsResolver()DNS resolver to be used by this client.- Returns:
- dns resolver
-
dnsAddressLookup
DnsAddressLookup dnsAddressLookup()DNS address lookup preferences to be used by this client. Default value is determined by capabilities of the system.- Returns:
- dns address lookup strategy
-
defaultHeadersMap
Default headers to be used in every request from configuration.- Returns:
- default headers
-
headers
Default headers to be used in every request.- Returns:
- default headers
-
defaultRequestHeaders
Default headers as a headers object. Creates a new instance for each call, so the returned value can be safely mutated.- Returns:
- default headers
-
mediaTypeParserMode
ParserMode mediaTypeParserMode()Configure media type parsing mode for HTTPContent-Type
header.- Returns:
- media type parsing mode
-
contentEncoding
ContentEncodingContext contentEncoding()Configure the listener specificContentEncodingContext
. This method discards all previously registered ContentEncodingContext. If no content encoding context is registered, default encoding context is used.- Returns:
- content encoding context
-
mediaContext
MediaContext mediaContext()Configure the listener specificMediaContext
. This method discards all previously registered MediaContext. If no media context is registered, default media context is used.- Returns:
- media context
-
mediaSupports
List<MediaSupport> mediaSupports()Media supports (manually added). If bothmediaContext()
and this is configured, there will be a new context created from return of this method, with fallback ofmediaContext()
.- Returns:
- list of explicitly added media supports
-
services
List<WebClientService> services()WebClient services.- Returns:
- services to use with this web client
-
relativeUris
boolean relativeUris()Can be set totrue
to force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.- Returns:
- relative URIs flag
-
executor
ExecutorService executor()Client executor service.- Returns:
- executor service to use when needed (such as for HTTP/2)
-
sendExpectContinue
boolean sendExpectContinue()Whether Expect-100-Continue header is sent to verify server availability before sending an entity.Defaults to
true
.- Returns:
- whether Expect:100-Continue header should be sent on streamed transfers
-
connectionCacheSize
int connectionCacheSize()Maximal size of the connection cache. For most HTTP protocols, we may cache connections to various endpoints for keep alive (or stream reuse in case of HTTP/2). This option limits the size. Setting this number lower than the "usual" number of target services will cause connections to be closed and reopened frequently. -
cookieManager
Optional<WebClientCookieManager> cookieManager()WebClient cookie manager.- Returns:
- cookie manager to use
-
readContinueTimeout
Duration readContinueTimeout()Socket 100-Continue read timeout. Default is 1 second. This read timeout is used when 100-Continue is sent by the client, before it sends an entity.- Returns:
- read 100-Continue timeout duration
-
maxInMemoryEntity
int maxInMemoryEntity()If the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance. If bigger, streaming will be used.Note that for some entity types we cannot use streaming, as they are already fully in memory (String, byte[]), for such cases, this option is ignored. Default is 128Kb.
- Returns:
- maximal number of bytes to buffer in memory for supported writers
-
followRedirects
boolean followRedirects()Whether to follow redirects.- Returns:
- whether to follow redirects
-
maxRedirects
int maxRedirects()Max number of followed redirects. This is ignored iffollowRedirects()
option isfalse
.- Returns:
- max number of followed redirects
-
tls
Tls tls()TLS configuration for any TLS request from this client. TLS can also be configured per request. TLS is used when the protocol is set tohttps
.- Returns:
- TLS configuration to use
-
readTimeout
Read timeout.- Returns:
- read timeout
- See Also:
-
connectTimeout
Connect timeout.- Returns:
- connect timeout
- See Also:
-
keepAlive
boolean keepAlive()Determines if connection keep alive is enabled (NOT socket keep alive, but HTTP connection keep alive, to re-use the same connection for multiple requests).- Returns:
- keep alive for this connection
- See Also:
-
proxy
Proxy proxy()Proxy configuration to be used for requests.- Returns:
- proxy to use, defaults to
Proxy.noProxy()
-
properties
Properties configured for this client. These properties are propagated through client request, to be used by services (and possibly for other purposes).- Returns:
- map of client properties
-