Interface ClientAltSvcConfig
- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
ClientAltSvcConfig.BuilderBase.ClientAltSvcConfigImpl
Alt-Svc response advertisements.
Alternative service handling is opt-in through HttpClientConfig.altSvc(). Supporting client protocols use
this policy only for HTTPS origins and same-host alternative authorities. Clear-text HTTP origins, including an
opportunistic transition from HTTP to TLS, and cross-host alternatives are not supported.
The client applies its configured TLS settings without additional restrictions when connecting to an alternative service. Unsafe TLS settings, such as trusting all certificates, therefore make alternative service handling correspondingly unsafe. Helidon honors the configured TLS policy and does not require its built-in trust manager.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forClientAltSvcConfig.static classClientAltSvcConfig.BuilderBase<BUILDER extends ClientAltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends ClientAltSvcConfig>Fluent API builder base forClientAltSvcConfig. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientAltSvcConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static ClientAltSvcConfig.Builderbuilder(ClientAltSvcConfig instance) Create a new fluent API builder from an existing instance.static ClientAltSvcConfigcreate()Create a new instance with default values.static ClientAltSvcConfigCreate a new instance from configuration.booleanenabled()Whether alternative service handling is enabled.Allowed alternative service protocol identifiers.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
enabled
boolean enabled()Whether alternative service handling is enabled.This option defaults to
true. Setting it tofalsedisables alternative service handling even when this configuration is present.- Returns:
- whether alternative service handling is enabled
-
protocols
Allowed alternative service protocol identifiers.An empty set permits every available client protocol that supports alternative services. A non-empty set is an exact, case-sensitive allow-list of opaque ALPN protocol identifiers; it is not validated against the protocols currently provided by the client. Each Java character in the range
U+0000throughU+00FFmaps one-to-one to an identifier byte. Each identifier must contain between1and255bytes, inclusive, when this policy is enabled.- Returns:
- allowed alternative service protocol identifiers
-