Class AltSvcConfig.BuilderBase.AltSvcConfigImpl

java.lang.Object
io.helidon.webserver.http.AltSvcConfig.BuilderBase.AltSvcConfigImpl
All Implemented Interfaces:
Prototype.Api, Prototype.Factory<AltSvc>, AltSvcConfig, Supplier<AltSvc>
Enclosing class:
AltSvcConfig.BuilderBase<BUILDER extends AltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends AltSvcConfig>

protected static class AltSvcConfig.BuilderBase.AltSvcConfigImpl extends Object implements AltSvcConfig, Supplier<AltSvc>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • AltSvcConfigImpl

      protected AltSvcConfigImpl(AltSvcConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • build

      public AltSvc build()
      Create a new runtime instance from this prototype.
      Specified by:
      build in interface Prototype.Factory<AltSvc>
      Returns:
      new configured runtime instance
    • get

      public AltSvc get()
      Specified by:
      get in interface Supplier<AltSvc>
    • enabled

      public boolean enabled()
      Description copied from interface: AltSvcConfig
      Whether the alternative service should be advertised.
      Specified by:
      enabled in interface AltSvcConfig
      Returns:
      whether advertisement is enabled
    • protocol

      public String protocol()
      Description copied from interface: AltSvcConfig
      Advertised protocol name. Each Java character in the range U+0000 through U+00FF maps one-to-one to an opaque protocol identifier byte. When advertisement is enabled, the identifier must contain between 1 and 255 bytes, inclusive. Whitespace-only identifiers are valid.
      Specified by:
      protocol in interface AltSvcConfig
      Returns:
      advertised protocol
    • port

      public Optional<Integer> port()
      Description copied from interface: AltSvcConfig
      Advertised port. The port must be between 1 and 65535, 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.
      Specified by:
      port in interface AltSvcConfig
      Returns:
      advertised port
    • maxAge

      public Optional<Duration> maxAge()
      Description copied from interface: AltSvcConfig
      Advertised maximum age. The maximum age must be non-negative when advertisement is enabled.
      Specified by:
      maxAge in interface AltSvcConfig
      Returns:
      maximum age
    • persist

      public boolean persist()
      Description copied from interface: AltSvcConfig
      Whether to emit the persist=1 parameter.
      Specified by:
      persist in interface AltSvcConfig
      Returns:
      whether to emit persist
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object