Module io.helidon.webclient.api
Package io.helidon.webclient.api
Class HttpConfigBase.BuilderBase<BUILDER extends HttpConfigBase.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpConfigBase>
java.lang.Object
io.helidon.webclient.api.HttpConfigBase.BuilderBase<BUILDER,PROTOTYPE>
- 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:
HttpClientConfig.BuilderBase
,HttpConfigBase.Builder
- Enclosing interface:
HttpConfigBase
public abstract static class HttpConfigBase.BuilderBase<BUILDER extends HttpConfigBase.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpConfigBase>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
HttpConfigBase
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddProperties
(Map<? extends String, ? extends String> properties) This method keeps existing values, then puts all new values into the map.Clear existing value of this property.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).Connect timeout.connectTimeout
(Duration connectTimeout) Connect timeout.boolean
Whether to follow redirects.followRedirects
(boolean followRedirects) Whether to follow redirects.from
(HttpConfigBase prototype) Update this builder from an existing prototype instance.from
(HttpConfigBase.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.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).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).int
Max number of followed redirects.maxRedirects
(int maxRedirects) Max number of followed redirects.protected void
Handles providers and decorators.Properties configured for this client.properties
(Map<? extends String, ? extends String> properties) This method replaces all values with the new ones.proxy()
Proxy configuration to be used for requests.Proxy configuration to be used for requests.proxy
(Consumer<Proxy.Builder> consumer) Proxy configuration to be used for requests.Proxy configuration to be used for requests.putProperty
(String key, String property) This method adds a new value to the map, or replaces it if the key already exists.Read timeout.readTimeout
(Duration readTimeout) Read timeout.tls()
TLS configuration for any TLS request from this client.TLS configuration for any TLS request from this client.TLS configuration for any TLS request from this client.tls
(Consumer<TlsConfig.Builder> consumer) TLS configuration for any TLS request from this client.TLS configuration for any TLS request from this client.toString()
protected void
Validates required properties.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 HttpConfigBase.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends HttpConfigBase> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
followRedirects
Whether to follow redirects.- Parameters:
followRedirects
- whether to follow redirects- Returns:
- updated builder instance
- See Also:
-
maxRedirects
Max number of followed redirects. This is ignored iffollowRedirects()
option isfalse
.- Parameters:
maxRedirects
- max number of followed redirects- Returns:
- updated builder instance
- See Also:
-
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
.- Parameters:
tls
- TLS configuration to use- Returns:
- updated builder instance
- See Also:
-
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
.- Parameters:
tlsConfig
- TLS configuration to use- Returns:
- updated builder instance
- See Also:
-
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
.- Parameters:
consumer
- consumer of builder for TLS configuration to use- Returns:
- updated builder instance
- See Also:
-
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
.- Parameters:
supplier
- supplier of TLS configuration to use- Returns:
- updated builder instance
- See Also:
-
clearReadTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
readTimeout
Read timeout.- Parameters:
readTimeout
- read timeout- Returns:
- updated builder instance
- See Also:
-
clearConnectTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectTimeout
Connect timeout.- Parameters:
connectTimeout
- connect timeout- Returns:
- updated builder instance
- See Also:
-
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).- Parameters:
keepAlive
- keep alive for this connection- Returns:
- updated builder instance
- See Also:
-
proxy
Proxy configuration to be used for requests.- Parameters:
proxy
- proxy to use, defaults toProxy.noProxy()
- Returns:
- updated builder instance
- See Also:
-
proxy
Proxy configuration to be used for requests.- Parameters:
consumer
- consumer of builder for proxy to use, defaults toProxy.noProxy()
- Returns:
- updated builder instance
- See Also:
-
proxy
Proxy configuration to be used for requests.- Parameters:
supplier
- supplier of proxy to use, defaults toProxy.noProxy()
- Returns:
- updated builder instance
- See Also:
-
properties
This method replaces all values with the new ones.- Parameters:
properties
- map of client properties- Returns:
- updated builder instance
- See Also:
-
addProperties
This method keeps existing values, then puts all new values into the map.- Parameters:
properties
- map of client properties- Returns:
- updated builder instance
- See Also:
-
putProperty
This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceproperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
followRedirects
public boolean followRedirects()Whether to follow redirects.- Returns:
- the follow redirects
-
maxRedirects
public int maxRedirects()Max number of followed redirects. This is ignored iffollowRedirects()
option isfalse
.- Returns:
- the max redirects
-
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:
- the tls
-
readTimeout
Read timeout.- Returns:
- the read timeout
- See Also:
-
connectTimeout
Connect timeout.- Returns:
- the connect timeout
- See Also:
-
keepAlive
public 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:
- the keep alive
- See Also:
-
proxy
Proxy configuration to be used for requests.- Returns:
- the proxy
-
properties
Properties configured for this client. These properties are propagated through client request, to be used by services (and possibly for other purposes).- Returns:
- the properties
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-