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 builderPROTOTYPE- type of the prototype interface that would be built byPrototype.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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.webserver.observe.ObserverConfigBase.BuilderBase
ObserverConfigBase.BuilderBase.ObserverConfigBaseImpl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSafeKey(String safeKey) Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1.addSafeKeys(Set<String> safeKeys) Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1.Secret patterns (regular expressions) matched against unescaped configuration keys to exclude from output.addSecrets(Set<String> secrets) Secret patterns (regular expressions) matched against unescaped configuration keys to exclude from output.Clear all safeKeys.Clear all secrets.Deprecated.Update builder from configuration (node of this type).endpoint()Endpoint this observer is available on.Endpoint this observer is available on.from(ConfigObserverConfig prototype) Update this builder from an existing prototype instance.from(ConfigObserverConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.booleanPermit all access, even when not authorized.permitAll(boolean permitAll) Permit all access, even when not authorized.protected voidHandles providers and decorators.safeKeys()Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1.Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1.secrets()Secret patterns (regular expressions) matched against unescaped configuration keys to exclude from output.Secret patterns (regular expressions) matched against unescaped configuration keys to exclude from output.toString()booleanWhether to include values that do not match configuredsafe-keyspatterns; values whose keys match configuredsecretspatterns are still obfuscated.unsafeValues(boolean unsafeValues) Whether to include values that do not match configuredsafe-keyspatterns; values whose keys match configuredsecretspatterns are still obfuscated.protected voidValidates required properties.Methods inherited from class io.helidon.webserver.observe.ObserverConfigBase.BuilderBase
config, enabled, enabled, from, from, name, nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.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
Deprecated.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 ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ConfigObserverConfig> - Overrides:
configin classObserverConfigBase.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
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 ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ConfigObserverConfig> - Overrides:
configin classObserverConfigBase.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
Endpoint this observer is available on.- Parameters:
endpoint- the observer endpoint- Returns:
- updated builder instance
- See Also:
-
permitAll
Permit all access, even when not authorized.- Parameters:
permitAll- whether to permit access for anybody- Returns:
- updated builder instance
- See Also:
-
clearSecrets
Clear all secrets.- Returns:
- updated builder instance
- See Also:
-
secrets
Secret patterns (regular expressions) matched against unescaped configuration keys 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.Built-in default patterns always added:
.*password.*.*passphrase.*.*pwd.*.*secret.*.*credential.*.*token.*.*api[-_.]?key.*.*access[-_.]?key.*.*private[-_.]?key.*.*connection[-_.]?url.*
- Parameters:
secrets- set of regular expression patterns for keys, where values should be excluded from output- Returns:
- updated builder instance
- See Also:
-
addSecrets
Secret patterns (regular expressions) matched against unescaped configuration keys 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.Built-in default patterns always added:
.*password.*.*passphrase.*.*pwd.*.*secret.*.*credential.*.*token.*.*api[-_.]?key.*.*access[-_.]?key.*.*private[-_.]?key.*.*connection[-_.]?url.*
- Parameters:
secrets- set of regular expression patterns for keys, where values should be excluded from output- Returns:
- updated builder instance
- See Also:
-
addSecret
Secret patterns (regular expressions) matched against unescaped configuration keys 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.Built-in default patterns always added:
.*password.*.*passphrase.*.*pwd.*.*secret.*.*credential.*.*token.*.*api[-_.]?key.*.*access[-_.]?key.*.*private[-_.]?key.*.*connection[-_.]?url.*
- 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
Clear all safeKeys.- Returns:
- updated builder instance
- See Also:
-
safeKeys
Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1. Any pattern that matches a key will cause the output to contain the value, unless it also matches asecrets()pattern. Patterns are matched case-insensitively against the escaped configuration key, preserving the distinction between path separators and dots within a node name. For example,server[.]hostmatches thehostchild ofserver, whileserver~1hostmatches a single node namedserver.host.- Parameters:
safeKeys- set of regular expression patterns for keys, where values can be included in output- Returns:
- updated builder instance
- See Also:
-
addSafeKeys
Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1. Any pattern that matches a key will cause the output to contain the value, unless it also matches asecrets()pattern. Patterns are matched case-insensitively against the escaped configuration key, preserving the distinction between path separators and dots within a node name. For example,server[.]hostmatches thehostchild ofserver, whileserver~1hostmatches a single node namedserver.host.- Parameters:
safeKeys- set of regular expression patterns for keys, where values can be included in output- Returns:
- updated builder instance
- See Also:
-
addSafeKey
Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1. Any pattern that matches a key will cause the output to contain the value, unless it also matches asecrets()pattern. Patterns are matched case-insensitively against the escaped configuration key, preserving the distinction between path separators and dots within a node name. For example,server[.]hostmatches thehostchild ofserver, whileserver~1hostmatches a single node namedserver.host.- 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
Whether to include values that do not match configuredsafe-keyspatterns; values whose keys match configuredsecretspatterns are still obfuscated. If enabled, the observer uses the previous behavior and only obfuscates values whose keys matchsecrets().- Parameters:
unsafeValues- whether to include unsafe values in output- Returns:
- updated builder instance
- See Also:
-
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
Secret patterns (regular expressions) matched against unescaped configuration keys 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.Built-in default patterns always added:
.*password.*.*passphrase.*.*pwd.*.*secret.*.*credential.*.*token.*.*api[-_.]?key.*.*access[-_.]?key.*.*private[-_.]?key.*.*connection[-_.]?url.*
- Returns:
- set of regular expression patterns for keys, where values should be excluded from output
-
safeKeys
Safe key patterns (regular expressions) matched against escaped configuration keys to include in output, with dots within node names represented as~1. Any pattern that matches a key will cause the output to contain the value, unless it also matches asecrets()pattern. Patterns are matched case-insensitively against the escaped configuration key, preserving the distinction between path separators and dots within a node name. For example,server[.]hostmatches thehostchild ofserver, whileserver~1hostmatches a single node namedserver.host.- 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 configuredsafe-keyspatterns; values whose keys match configuredsecretspatterns are still obfuscated. If enabled, the observer uses the previous behavior and only obfuscates values whose keys matchsecrets().- Returns:
- whether to include unsafe values in output
-
toString
- Overrides:
toStringin classObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ConfigObserverConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototypein classObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ConfigObserverConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototypein classObserverConfigBase.BuilderBase<BUILDER extends ConfigObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ConfigObserverConfig>
-
config(io.helidon.config.Config)