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

java.lang.Object
io.helidon.webserver.observe.ObserverConfigBase.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.webserver.observe.config.ConfigObserverConfig.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>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
ConfigObserverConfig.Builder
Enclosing interface:
ConfigObserverConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(ConfigObserverConfig 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(ConfigObserverConfig.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

      @Deprecated 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 ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConfigObserverConfig>
      Overrides:
      config in class ObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConfigObserverConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      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 ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConfigObserverConfig>
      Overrides:
      config in class ObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConfigObserverConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • endpoint

      public BUILDER endpoint(String endpoint)
      Endpoint this observer is available on.
      Parameters:
      endpoint - the observer endpoint
      Returns:
      updated builder instance
      See Also:
    • permitAll

      public BUILDER permitAll(boolean permitAll)
      Permit all access, even when not authorized.
      Parameters:
      permitAll - whether to permit access for anybody
      Returns:
      updated builder instance
      See Also:
    • clearSecrets

      public BUILDER clearSecrets()
      Clear all secrets.
      Returns:
      updated builder instance
      See Also:
    • secrets

      public BUILDER secrets(Set<String> secrets)
      Secret patterns (regular expressions) to exclude from output. Any pattern that matches a key will cause the output to be obfuscated and not contain the value. Patterns are matched case-insensitively.

      Patterns always added:

      • .*password
      • .*passphrase
      • .*secret
      Parameters:
      secrets - set of regular expression patterns for keys, where values should be excluded from output
      Returns:
      updated builder instance
      See Also:
    • addSecrets

      public BUILDER addSecrets(Set<String> secrets)
      Secret patterns (regular expressions) to exclude from output. Any pattern that matches a key will cause the output to be obfuscated and not contain the value. Patterns are matched case-insensitively.

      Patterns always added:

      • .*password
      • .*passphrase
      • .*secret
      Parameters:
      secrets - set of regular expression patterns for keys, where values should be excluded from output
      Returns:
      updated builder instance
      See Also:
    • addSecret

      public BUILDER addSecret(String secret)
      Secret patterns (regular expressions) to exclude from output. Any pattern that matches a key will cause the output to be obfuscated and not contain the value. Patterns are matched case-insensitively.

      Patterns always added:

      • .*password
      • .*passphrase
      • .*secret
      Parameters:
      secret - add single set of regular expression patterns for keys, where values should be excluded from output
      Returns:
      updated builder instance
      See Also:
    • clearSafeKeys

      public BUILDER clearSafeKeys()
      Clear all safeKeys.
      Returns:
      updated builder instance
      See Also:
    • safeKeys

      public BUILDER safeKeys(Set<String> safeKeys)
      Safe key patterns (regular expressions) to include in output. Any pattern that matches a key will cause the output to contain the value, unless it also matches a secrets() pattern. Patterns are matched case-insensitively.
      Parameters:
      safeKeys - set of regular expression patterns for keys, where values can be included in output
      Returns:
      updated builder instance
      See Also:
    • addSafeKeys

      public BUILDER addSafeKeys(Set<String> safeKeys)
      Safe key patterns (regular expressions) to include in output. Any pattern that matches a key will cause the output to contain the value, unless it also matches a secrets() pattern. Patterns are matched case-insensitively.
      Parameters:
      safeKeys - set of regular expression patterns for keys, where values can be included in output
      Returns:
      updated builder instance
      See Also:
    • addSafeKey

      public BUILDER addSafeKey(String safeKey)
      Safe key patterns (regular expressions) to include in output. Any pattern that matches a key will cause the output to contain the value, unless it also matches a secrets() pattern. Patterns are matched case-insensitively.
      Parameters:
      safeKey - add single set of regular expression patterns for keys, where values can be included in output
      Returns:
      updated builder instance
      See Also:
    • unsafeValues

      public BUILDER unsafeValues(boolean unsafeValues)
      Whether to include values that do not match configured safe-keys patterns; values whose keys match configured secrets patterns are still obfuscated. If enabled, the observer uses the previous behavior and only obfuscates values whose keys match secrets().
      Parameters:
      unsafeValues - whether to include unsafe values in output
      Returns:
      updated builder instance
      See Also:
    • endpoint

      public String endpoint()
      Endpoint this observer is available on.
      Returns:
      the observer endpoint
    • permitAll

      public boolean permitAll()
      Permit all access, even when not authorized.
      Returns:
      whether to permit access for anybody
    • secrets

      public Set<String> secrets()
      Secret patterns (regular expressions) to exclude from output. Any pattern that matches a key will cause the output to be obfuscated and not contain the value. Patterns are matched case-insensitively.

      Patterns always added:

      • .*password
      • .*passphrase
      • .*secret
      Returns:
      set of regular expression patterns for keys, where values should be excluded from output
    • safeKeys

      public Set<String> safeKeys()
      Safe key patterns (regular expressions) to include in output. Any pattern that matches a key will cause the output to contain the value, unless it also matches a secrets() pattern. Patterns are matched case-insensitively.
      Returns:
      set of regular expression patterns for keys, where values can be included in output
    • unsafeValues

      public boolean unsafeValues()
      Whether to include values that do not match configured safe-keys patterns; values whose keys match configured secrets patterns are still obfuscated. If enabled, the observer uses the previous behavior and only obfuscates values whose keys match secrets().
      Returns:
      whether to include unsafe values in output
    • toString

      public String toString()
      Overrides:
      toString in class ObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConfigObserverConfig>
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
      Overrides:
      preBuildPrototype in class ObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConfigObserverConfig>
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
      Overrides:
      validatePrototype in class ObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConfigObserverConfig>