Module io.helidon.webclient.api
Package io.helidon.webclient.api
Class HttpClientConfig.BuilderBase.HttpClientConfigImpl
java.lang.Object
io.helidon.webclient.api.HttpConfigBase.BuilderBase.HttpConfigBaseImpl
io.helidon.webclient.api.HttpClientConfig.BuilderBase.HttpClientConfigImpl
- All Implemented Interfaces:
Prototype.Api
,HttpClientConfig
,HttpConfigBase
- Direct Known Subclasses:
GrpcClientConfig.BuilderBase.GrpcClientConfigImpl
,Http1ClientConfig.BuilderBase.Http1ClientConfigImpl
,Http2ClientConfig.BuilderBase.Http2ClientConfigImpl
,JsonRpcClientConfig.BuilderBase.JsonRpcClientConfigImpl
,WebClientConfig.BuilderBase.WebClientConfigImpl
,WsClientConfig.BuilderBase.WsClientConfigImpl
- Enclosing class:
HttpClientConfig.BuilderBase<BUILDER extends HttpClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends HttpClientConfig>
protected static class HttpClientConfig.BuilderBase.HttpClientConfigImpl
extends HttpConfigBase.BuilderBase.HttpConfigBaseImpl
implements HttpClientConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
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
ConstructorsModifierConstructorDescriptionprotected
HttpClientConfigImpl
(HttpClientConfig.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.int
Maximal size of the connection cache.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.int
hashCode()
headers()
Default headers to be used in every request.int
If the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance.Configure the listener specificMediaContext
.Media supports (manually added).Configure media type parsing mode for HTTPContent-Type
header.Socket 100-Continue 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.toString()
int
Buffer size used when writing data to the underlying socket on a client TCP connection.Methods inherited from class io.helidon.webclient.api.HttpConfigBase.BuilderBase.HttpConfigBaseImpl
connectTimeout, followRedirects, keepAlive, maxRedirects, properties, proxy, readTimeout, tls
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.webclient.api.HttpConfigBase
connectTimeout, followRedirects, keepAlive, maxRedirects, properties, proxy, readTimeout, tls
-
Constructor Details
-
HttpClientConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
baseUri
Description copied from interface:HttpClientConfig
Base uri used by the client in all requests.- Specified by:
baseUri
in interfaceHttpClientConfig
- Returns:
- base uri of the client requests
-
baseQuery
Description copied from interface:HttpClientConfig
Base query used by the client in all requests.- Specified by:
baseQuery
in interfaceHttpClientConfig
- Returns:
- base query of the client requests
-
baseFragment
Description copied from interface:HttpClientConfig
Base fragment used by the client in all requests (unless overwritten on per-request basis).- Specified by:
baseFragment
in interfaceHttpClientConfig
- Returns:
- fragment to use
-
socketOptions
Description copied from interface:HttpClientConfig
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:- Specified by:
socketOptions
in interfaceHttpClientConfig
- Returns:
- socket options
-
dnsResolver
Description copied from interface:HttpClientConfig
DNS resolver to be used by this client.- Specified by:
dnsResolver
in interfaceHttpClientConfig
- Returns:
- dns resolver
-
dnsAddressLookup
Description copied from interface:HttpClientConfig
DNS address lookup preferences to be used by this client. Default value is determined by capabilities of the system.- Specified by:
dnsAddressLookup
in interfaceHttpClientConfig
- Returns:
- dns address lookup strategy
-
defaultHeadersMap
Description copied from interface:HttpClientConfig
Default headers to be used in every request from configuration.- Specified by:
defaultHeadersMap
in interfaceHttpClientConfig
- Returns:
- default headers
-
headers
Description copied from interface:HttpClientConfig
Default headers to be used in every request.- Specified by:
headers
in interfaceHttpClientConfig
- Returns:
- default headers
-
mediaTypeParserMode
Description copied from interface:HttpClientConfig
Configure media type parsing mode for HTTPContent-Type
header.- Specified by:
mediaTypeParserMode
in interfaceHttpClientConfig
- Returns:
- media type parsing mode
-
contentEncoding
Description copied from interface:HttpClientConfig
Configure the listener specificContentEncodingContext
. This method discards all previously registered ContentEncodingContext. If no content encoding context is registered, default encoding context is used.- Specified by:
contentEncoding
in interfaceHttpClientConfig
- Returns:
- content encoding context
-
mediaContext
Description copied from interface:HttpClientConfig
Configure the listener specificMediaContext
. This method discards all previously registered MediaContext. If no media context is registered, default media context is used.- Specified by:
mediaContext
in interfaceHttpClientConfig
- Returns:
- media context
-
mediaSupports
Description copied from interface:HttpClientConfig
Media supports (manually added). If bothHttpClientConfig.mediaContext()
and this is configured, there will be a new context created from return of this method, with fallback ofHttpClientConfig.mediaContext()
.- Specified by:
mediaSupports
in interfaceHttpClientConfig
- Returns:
- list of explicitly added media supports
-
services
Description copied from interface:HttpClientConfig
WebClient services.- Specified by:
services
in interfaceHttpClientConfig
- Returns:
- services to use with this web client
-
relativeUris
public boolean relativeUris()Description copied from interface:HttpClientConfig
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.- Specified by:
relativeUris
in interfaceHttpClientConfig
- Returns:
- relative URIs flag
-
executor
Description copied from interface:HttpClientConfig
Client executor service.- Specified by:
executor
in interfaceHttpClientConfig
- Returns:
- executor service to use when needed (such as for HTTP/2)
-
sendExpectContinue
public boolean sendExpectContinue()Description copied from interface:HttpClientConfig
Whether Expect-100-Continue header is sent to verify server availability before sending an entity.Defaults to
true
.- Specified by:
sendExpectContinue
in interfaceHttpClientConfig
- Returns:
- whether Expect:100-Continue header should be sent on streamed transfers
-
connectionCacheSize
public int connectionCacheSize()Description copied from interface:HttpClientConfig
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.- Specified by:
connectionCacheSize
in interfaceHttpClientConfig
-
cookieManager
Description copied from interface:HttpClientConfig
WebClient cookie manager.- Specified by:
cookieManager
in interfaceHttpClientConfig
- Returns:
- cookie manager to use
-
readContinueTimeout
Description copied from interface:HttpClientConfig
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.- Specified by:
readContinueTimeout
in interfaceHttpClientConfig
- Returns:
- read 100-Continue timeout duration
-
maxInMemoryEntity
public int maxInMemoryEntity()Description copied from interface:HttpClientConfig
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.
- Specified by:
maxInMemoryEntity
in interfaceHttpClientConfig
- Returns:
- maximal number of bytes to buffer in memory for supported writers
-
writeBufferSize
public int writeBufferSize()Description copied from interface:HttpClientConfig
Buffer size used when writing data to the underlying socket on a client TCP connection. A value that is less or equal to 1 can be set to disable buffering at this level. Note that if writing data to the socket in small chunks, they may not be delivered to the network immediately due to Nagle's algorithm (i.e., if TCP_NO_DELAY is turned off).- Specified by:
writeBufferSize
in interfaceHttpClientConfig
- Returns:
- number of bytes in write buffer
-
toString
- Overrides:
toString
in classHttpConfigBase.BuilderBase.HttpConfigBaseImpl
-
equals
- Overrides:
equals
in classHttpConfigBase.BuilderBase.HttpConfigBaseImpl
-
hashCode
public int hashCode()- Overrides:
hashCode
in classHttpConfigBase.BuilderBase.HttpConfigBaseImpl
-
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
-