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
ConstructorsModifierConstructorDescriptionprotectedHttpClientConfigImpl(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.intMaximal size of the connection cache.Configure the listener specificContentEncodingContext.WebClient cookie manager.Default headers to be used in every request from configuration.default ClientRequestHeadersDefault headers as a headers object.DNS address lookup preferences to be used by this client.DNS resolver to be used by this client.booleanexecutor()Client executor service.inthashCode()headers()Default headers to be used in every request.intIf 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-Typeheader.Socket 100-Continue read timeout.booleanCan be set totrueto force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.booleanWhether Expect-100-Continue header is sent to verify server availability before sending an entity.services()WebClient services.booleanWhether to share connection cache between all the WebClient instances in JVM.Socket options for connections opened by this client.toString()intBuffer 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, tlsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:HttpClientConfigBase uri used by the client in all requests.- Specified by:
baseUriin interfaceHttpClientConfig- Returns:
- base uri of the client requests
-
baseQuery
Description copied from interface:HttpClientConfigBase query used by the client in all requests.- Specified by:
baseQueryin interfaceHttpClientConfig- Returns:
- base query of the client requests
-
baseFragment
Description copied from interface:HttpClientConfigBase fragment used by the client in all requests (unless overwritten on per-request basis).- Specified by:
baseFragmentin interfaceHttpClientConfig- Returns:
- fragment to use
-
socketOptions
Description copied from interface:HttpClientConfigSocket 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:
socketOptionsin interfaceHttpClientConfig- Returns:
- socket options
-
dnsResolver
Description copied from interface:HttpClientConfigDNS resolver to be used by this client.- Specified by:
dnsResolverin interfaceHttpClientConfig- Returns:
- dns resolver
-
dnsAddressLookup
Description copied from interface:HttpClientConfigDNS address lookup preferences to be used by this client. Default value is determined by capabilities of the system.- Specified by:
dnsAddressLookupin interfaceHttpClientConfig- Returns:
- dns address lookup strategy
-
defaultHeadersMap
Description copied from interface:HttpClientConfigDefault headers to be used in every request from configuration.- Specified by:
defaultHeadersMapin interfaceHttpClientConfig- Returns:
- default headers
-
headers
Description copied from interface:HttpClientConfigDefault headers to be used in every request.- Specified by:
headersin interfaceHttpClientConfig- Returns:
- default headers
-
mediaTypeParserMode
Description copied from interface:HttpClientConfigConfigure media type parsing mode for HTTPContent-Typeheader.- Specified by:
mediaTypeParserModein interfaceHttpClientConfig- Returns:
- media type parsing mode
-
contentEncoding
Description copied from interface:HttpClientConfigConfigure the listener specificContentEncodingContext. This method discards all previously registered ContentEncodingContext. If no content encoding context is registered, default encoding context is used.- Specified by:
contentEncodingin interfaceHttpClientConfig- Returns:
- content encoding context
-
mediaContext
Description copied from interface:HttpClientConfigConfigure the listener specificMediaContext. This method discards all previously registered MediaContext. If no media context is registered, default media context is used.- Specified by:
mediaContextin interfaceHttpClientConfig- Returns:
- media context
-
mediaSupports
Description copied from interface:HttpClientConfigMedia 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:
mediaSupportsin interfaceHttpClientConfig- Returns:
- list of explicitly added media supports
-
services
Description copied from interface:HttpClientConfigWebClient services.- Specified by:
servicesin interfaceHttpClientConfig- Returns:
- services to use with this web client
-
relativeUris
public boolean relativeUris()Description copied from interface:HttpClientConfigCan be set totrueto force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.- Specified by:
relativeUrisin interfaceHttpClientConfig- Returns:
- relative URIs flag
-
executor
Description copied from interface:HttpClientConfigClient executor service.- Specified by:
executorin interfaceHttpClientConfig- Returns:
- executor service to use when needed (such as for HTTP/2)
-
sendExpectContinue
public boolean sendExpectContinue()Description copied from interface:HttpClientConfigWhether Expect-100-Continue header is sent to verify server availability before sending an entity.Defaults to
true.- Specified by:
sendExpectContinuein interfaceHttpClientConfig- Returns:
- whether Expect:100-Continue header should be sent on streamed transfers
-
connectionCacheSize
public int connectionCacheSize()Description copied from interface:HttpClientConfigMaximal 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:
connectionCacheSizein interfaceHttpClientConfig
-
cookieManager
Description copied from interface:HttpClientConfigWebClient cookie manager.- Specified by:
cookieManagerin interfaceHttpClientConfig- Returns:
- cookie manager to use
-
readContinueTimeout
Description copied from interface:HttpClientConfigSocket 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:
readContinueTimeoutin interfaceHttpClientConfig- Returns:
- read 100-Continue timeout duration
-
maxInMemoryEntity
public int maxInMemoryEntity()Description copied from interface:HttpClientConfigIf 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:
maxInMemoryEntityin interfaceHttpClientConfig- Returns:
- maximal number of bytes to buffer in memory for supported writers
-
writeBufferSize
public int writeBufferSize()Description copied from interface:HttpClientConfigBuffer 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:
writeBufferSizein interfaceHttpClientConfig- Returns:
- number of bytes in write buffer
-
toString
- Overrides:
toStringin classHttpConfigBase.BuilderBase.HttpConfigBaseImpl
-
equals
- Overrides:
equalsin classHttpConfigBase.BuilderBase.HttpConfigBaseImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein 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
-