Class WebClientConfig.BuilderBase<BUILDER extends WebClientConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends WebClientConfig>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
WebClientConfig.Builder
- Enclosing interface:
WebClientConfig
WebClient
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.webclient.api.HttpClientConfig.BuilderBase
HttpClientConfig.BuilderBase.HttpClientConfigImpl
Nested classes/interfaces inherited from class io.helidon.webclient.api.HttpConfigBase.BuilderBase
HttpConfigBase.BuilderBase.HttpConfigBaseImpl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddProtocolConfig
(ProtocolConfig protocolConfig) Configuration of client protocols.addProtocolConfigs
(List<? extends ProtocolConfig> protocolConfigs) Configuration of client protocols.addProtocolPreference
(String protocolPreference) List of HTTP protocol IDs by order of preference.addProtocolPreference
(List<? extends String> protocolPreference) List of HTTP protocol IDs by order of preference.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).from
(WebClientConfig prototype) Update this builder from an existing prototype instance.from
(WebClientConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.protected void
Handles providers and decorators.Configuration of client protocols.protocolConfigs
(List<? extends ProtocolConfig> protocolConfigs) Configuration of client protocols.protocolConfigsDiscoverServices
(boolean discoverServices) Configuration of client protocols.List of HTTP protocol IDs by order of preference.protocolPreference
(List<? extends String> protocolPreference) List of HTTP protocol IDs by order of preference.toString()
protected void
Validates required properties.Methods inherited from class io.helidon.webclient.api.HttpClientConfig.BuilderBase
addDefaultHeadersMap, addHeader, addHeader, addHeader, addHeader, addHeader, addHeader, addHeader, addHeaders, addMediaSupport, addMediaSupports, addService, addServices, baseFragment, baseFragment, baseQuery, baseQuery, baseUri, baseUri, baseUri, baseUri, baseUri, clearBaseFragment, clearBaseQuery, clearBaseUri, clearCookieManager, connectionCacheSize, connectionCacheSize, contentEncoding, contentEncoding, contentEncoding, contentEncoding, contentEncoding, cookieManager, cookieManager, cookieManager, cookieManager, defaultHeadersMap, defaultHeadersMap, dnsAddressLookup, dnsAddressLookup, dnsResolver, dnsResolver, executor, executor, from, from, headers, headers, maxInMemoryEntity, maxInMemoryEntity, mediaContext, mediaContext, mediaContext, mediaContext, mediaContext, mediaSupports, mediaSupports, mediaTypeParserMode, mediaTypeParserMode, readContinueTimeout, readContinueTimeout, relativeUris, relativeUris, sendExpectContinue, sendExpectContinue, services, services, servicesDiscoverServices, shareConnectionCache, shareConnectionCache, socketOptions, socketOptions, socketOptions, socketOptions
Methods inherited from class io.helidon.webclient.api.HttpConfigBase.BuilderBase
addProperties, clearConnectTimeout, clearReadTimeout, connectTimeout, connectTimeout, followRedirects, followRedirects, from, from, keepAlive, keepAlive, maxRedirects, maxRedirects, properties, properties, proxy, proxy, proxy, proxy, putProperty, readTimeout, readTimeout, tls, tls, tls, tls, tls
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends WebClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebClientConfig> - Overrides:
config
in classHttpClientConfig.BuilderBase<BUILDER extends WebClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebClientConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
protocolConfigsDiscoverServices
Configuration of client protocols.- Parameters:
discoverServices
- whether to discover implementations through service loader- Returns:
- updated builder instance
- See Also:
-
protocolConfigs
Configuration of client protocols.- Parameters:
protocolConfigs
- client protocol configurations- Returns:
- updated builder instance
- See Also:
-
addProtocolConfigs
Configuration of client protocols.- Parameters:
protocolConfigs
- client protocol configurations- Returns:
- updated builder instance
- See Also:
-
addProtocolConfig
Configuration of client protocols.- Parameters:
protocolConfig
- client protocol configurations- Returns:
- updated builder instance
- See Also:
-
protocolPreference
List of HTTP protocol IDs by order of preference. If left empty, all discovered providers will be used, ordered by weight.For example if both HTTP/2 and HTTP/1.1 providers are available (considering HTTP/2 has higher weights), for ALPN we will send h2 and http/1.1 and decide based on response. If TLS is not used, we would attempt an upgrade (or use prior knowledge if configured in
protocolConfigs()
).- Parameters:
protocolPreference
- list of HTTP protocol IDs in order of preference- Returns:
- updated builder instance
- See Also:
-
addProtocolPreference
List of HTTP protocol IDs by order of preference. If left empty, all discovered providers will be used, ordered by weight.For example if both HTTP/2 and HTTP/1.1 providers are available (considering HTTP/2 has higher weights), for ALPN we will send h2 and http/1.1 and decide based on response. If TLS is not used, we would attempt an upgrade (or use prior knowledge if configured in
protocolConfigs()
).- Parameters:
protocolPreference
- list of HTTP protocol IDs in order of preference- Returns:
- updated builder instance
- See Also:
-
addProtocolPreference
List of HTTP protocol IDs by order of preference. If left empty, all discovered providers will be used, ordered by weight.For example if both HTTP/2 and HTTP/1.1 providers are available (considering HTTP/2 has higher weights), for ALPN we will send h2 and http/1.1 and decide based on response. If TLS is not used, we would attempt an upgrade (or use prior knowledge if configured in
protocolConfigs()
).- Parameters:
protocolPreference
- list of HTTP protocol IDs in order of preference- Returns:
- updated builder instance
- See Also:
-
protocolConfigs
Configuration of client protocols.- Returns:
- the protocol configs
-
protocolPreference
List of HTTP protocol IDs by order of preference. If left empty, all discovered providers will be used, ordered by weight.For example if both HTTP/2 and HTTP/1.1 providers are available (considering HTTP/2 has higher weights), for ALPN we will send h2 and http/1.1 and decide based on response. If TLS is not used, we would attempt an upgrade (or use prior knowledge if configured in
protocolConfigs()
).- Returns:
- the protocol preference
-
config
If this instance was configured, this would be the config instance used.- Overrides:
config
in classHttpClientConfig.BuilderBase<BUILDER extends WebClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebClientConfig> - Returns:
- config node used to configure this builder, or empty if not configured
-
toString
- Overrides:
toString
in classHttpClientConfig.BuilderBase<BUILDER extends WebClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebClientConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototype
in classHttpClientConfig.BuilderBase<BUILDER extends WebClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebClientConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototype
in classHttpClientConfig.BuilderBase<BUILDER extends WebClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebClientConfig>
-