Class ClientAltSvcConfig.BuilderBase<BUILDER extends ClientAltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends ClientAltSvcConfig>

java.lang.Object
io.helidon.webclient.api.ClientAltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER, PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Direct Known Subclasses:
ClientAltSvcConfig.Builder
Enclosing interface:
ClientAltSvcConfig

public abstract static class ClientAltSvcConfig.BuilderBase<BUILDER extends ClientAltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends ClientAltSvcConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for ClientAltSvcConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(ClientAltSvcConfig prototype)
      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

      public BUILDER from(ClientAltSvcConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config 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 interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends ClientAltSvcConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends ClientAltSvcConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      Whether alternative service handling is enabled.

      This option defaults to true. Setting it to false disables alternative service handling even when this configuration is present.

      Parameters:
      enabled - whether alternative service handling is enabled
      Returns:
      updated builder instance
      See Also:
    • clearProtocols

      public BUILDER clearProtocols()
      Clear all protocols.
      Returns:
      updated builder instance
      See Also:
    • protocols

      public BUILDER protocols(Set<String> 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+0000 through U+00FF maps one-to-one to an identifier byte. Each identifier must contain between 1 and 255 bytes, inclusive, when this policy is enabled.

      Parameters:
      protocols - allowed alternative service protocol identifiers
      Returns:
      updated builder instance
      See Also:
    • addProtocols

      public BUILDER addProtocols(Set<String> 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+0000 through U+00FF maps one-to-one to an identifier byte. Each identifier must contain between 1 and 255 bytes, inclusive, when this policy is enabled.

      Parameters:
      protocols - allowed alternative service protocol identifiers
      Returns:
      updated builder instance
      See Also:
    • addProtocol

      public BUILDER addProtocol(String protocol)
      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+0000 through U+00FF maps one-to-one to an identifier byte. Each identifier must contain between 1 and 255 bytes, inclusive, when this policy is enabled.

      Parameters:
      protocol - add single allowed alternative service protocol identifiers
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      Whether alternative service handling is enabled.

      This option defaults to true. Setting it to false disables alternative service handling even when this configuration is present.

      Returns:
      whether alternative service handling is enabled
    • protocols

      public Set<String> 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+0000 through U+00FF maps one-to-one to an identifier byte. Each identifier must contain between 1 and 255 bytes, inclusive, when this policy is enabled.

      Returns:
      allowed alternative service protocol identifiers
    • toString

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

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance