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

java.lang.Object
io.helidon.webclient.api.SniConfig.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:
SniConfig.Builder
Enclosing interface:
SniConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(SniConfig 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(SniConfig.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 SniConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends SniConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • mode

      public BUILDER mode(SniMode mode)
      TLS peer host source mode for SNI and endpoint identification: uri-host, host-header, explicit, or disabled.

      DNS names are sent as SNI server names. IP literals are used for endpoint identification without a DNS SNI server name. disabled clears the SNI server name without disabling endpoint identification.

      Parameters:
      mode - SNI mode
      Returns:
      updated builder instance
      See Also:
    • clearHost

      public BUILDER clearHost()
      Clear existing value of host.
      Returns:
      updated builder instance
      See Also:
    • host

      public BUILDER host(String host)
      Explicit TLS peer host used when mode is explicit. DNS hosts are sent as SNI server names and used for endpoint identification. IP literals are used for endpoint identification without a DNS SNI server name.

      The host must be configured only when mode is explicit, and it must not include a port. Bracketed IPv6 literals are accepted and normalized to the host value without brackets.

      Parameters:
      host - explicit TLS peer host
      Returns:
      updated builder instance
      See Also:
    • mode

      public SniMode mode()
      TLS peer host source mode for SNI and endpoint identification: uri-host, host-header, explicit, or disabled.

      DNS names are sent as SNI server names. IP literals are used for endpoint identification without a DNS SNI server name. disabled clears the SNI server name without disabling endpoint identification.

      Returns:
      SNI mode
    • host

      public Optional<String> host()
      Explicit TLS peer host used when mode is explicit. DNS hosts are sent as SNI server names and used for endpoint identification. IP literals are used for endpoint identification without a DNS SNI server name.

      The host must be configured only when mode is explicit, and it must not include a port. Bracketed IPv6 literals are accepted and normalized to the host value without brackets.

      Returns:
      explicit TLS peer host
    • 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