Class AltSvc
java.lang.Object
io.helidon.webserver.http.AltSvc
- All Implemented Interfaces:
RuntimeType.Api<AltSvcConfig>
Runtime support for a single advertised alternative service.
Each instance is bound to at most one listener.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AltSvcConfig.Builderbuilder()Create a fluent API builder.static AltSvccreate(AltSvcConfig config) Create from its configuration prototype.static AltSvccreate(Consumer<AltSvcConfig.Builder> consumer) Create by customizing the configuration builder.header(int listenerPort) Create the header for the provided listener port.headerValue(int listenerPort) Create the header value for the provided listener port.The prototype as it was received when creating this runtime object instance.
-
Method Details
-
builder
-
create
Create from its configuration prototype.- Parameters:
config- configuration prototype- Returns:
- a new alternative service runtime
-
create
Create by customizing the configuration builder.- Parameters:
consumer- builder customizer- Returns:
- a new alternative service runtime
-
prototype
Description copied from interface:RuntimeType.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
prototypein interfaceRuntimeType.Api<AltSvcConfig>- Returns:
- prototype object used to create this instance
-
header
Create the header for the provided listener port.- Parameters:
listenerPort- current listener port- Returns:
- header
- Throws:
IllegalArgumentException- if there is no valid effective portIllegalStateException- if this instance is reused for a different listener port
-
headerValue
Create the header value for the provided listener port.- Parameters:
listenerPort- current listener port- Returns:
- header value
- Throws:
IllegalArgumentException- if there is no valid effective portIllegalStateException- if this instance is reused for a different listener port
-