Class AltSvcConfig.BuilderBase<BUILDER extends AltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends AltSvcConfig>
java.lang.Object
io.helidon.webserver.http.AltSvcConfig.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>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
- Direct Known Subclasses:
AltSvcConfig.Builder
- Enclosing interface:
AltSvcConfig
public abstract static class AltSvcConfig.BuilderBase<BUILDER extends AltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends AltSvcConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for
AltSvcConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClear existing value of maxAge.Clear existing value of port.config()Configuration used to configure this instance.Update builder from configuration (node of this type).booleanenabled()Whether the alternative service should be advertised.enabled(boolean enabled) Whether the alternative service should be advertised.from(AltSvcConfig prototype) Update this builder from an existing prototype instance.from(AltSvcConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.maxAge()Advertised maximum age.Advertised maximum age.booleanpersist()Whether to emit thepersist=1parameter.persist(boolean persist) Whether to emit thepersist=1parameter.port()Advertised port.port(int port) Advertised port.protected voidHandles providers and decorators.protocol()Advertised protocol name.Advertised protocol name.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Prototype.Builder
buildPrototype, self
-
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:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends AltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends AltSvcConfig>- Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
enabled
Whether the alternative service should be advertised.- Parameters:
enabled- whether advertisement is enabled- Returns:
- updated builder instance
- See Also:
-
protocol
Advertised protocol name. Each Java character in the rangeU+0000throughU+00FFmaps one-to-one to an opaque protocol identifier byte. When advertisement is enabled, the identifier must contain between1and255bytes, inclusive. Whitespace-only identifiers are valid.- Parameters:
protocol- advertised protocol- Returns:
- updated builder instance
- See Also:
-
clearPort
Clear existing value of port.- Returns:
- updated builder instance
- See Also:
-
port
Advertised port. The port must be between1and65535, inclusive, when advertisement is enabled. If not configured, the local port of a port-capable binding is used. A binding without a valid port, such as a Unix domain socket binding, does not emit the configured advertisement unless an explicit port is configured.- Parameters:
port- advertised port- Returns:
- updated builder instance
- See Also:
-
clearMaxAge
Clear existing value of maxAge.- Returns:
- updated builder instance
- See Also:
-
maxAge
-
persist
Whether to emit thepersist=1parameter.- Parameters:
persist- whether to emit persist- Returns:
- updated builder instance
- See Also:
-
enabled
public boolean enabled()Whether the alternative service should be advertised.- Returns:
- whether advertisement is enabled
-
protocol
Advertised protocol name. Each Java character in the rangeU+0000throughU+00FFmaps one-to-one to an opaque protocol identifier byte. When advertisement is enabled, the identifier must contain between1and255bytes, inclusive. Whitespace-only identifiers are valid.- Returns:
- advertised protocol
-
port
Advertised port. The port must be between1and65535, inclusive, when advertisement is enabled. If not configured, the local port of a port-capable binding is used. A binding without a valid port, such as a Unix domain socket binding, does not emit the configured advertisement unless an explicit port is configured.- Returns:
- advertised port
-
maxAge
-
persist
public boolean persist()Whether to emit thepersist=1parameter.- Returns:
- whether to emit persist
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
-