Class EnvironmentFilterSpecification
- java.lang.Object
-
- io.micronaut.management.endpoint.env.EnvironmentFilterSpecification
-
public final class EnvironmentFilterSpecification extends java.lang.ObjectThis class is passed to an instance ofEnvironmentEndpointFilter(if one is defined) each time theEnvironmentEndpointis invoked.- Since:
- 3.3.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull EnvironmentFilterSpecificationexclude(@NotNull java.lang.String... keys)Adds literal strings to the list of excluded keys.@NotNull EnvironmentFilterSpecificationexclude(@NotNull java.util.function.Predicate<java.lang.String> keyPredicate)Adds a predicate to test property keys.@NotNull EnvironmentFilterSpecificationexclude(@NotNull java.util.regex.Pattern... keyPatterns)Adds regular expression patterns to the list of known masks.@NotNull EnvironmentFilterSpecificationlegacyMasking()Configures the key masking to behave as it did prior to 3.3.0.@NotNull EnvironmentFilterSpecificationmaskAll()Turn on global masking.@NotNull EnvironmentFilterSpecificationmaskNone()Turn off global masking.
-
-
-
Method Detail
-
maskAll
@NotNull public @NotNull EnvironmentFilterSpecification maskAll()
Turn on global masking. Items can be unmasked by executing any of the exclude methods.- Returns:
- this
-
maskNone
@NotNull public @NotNull EnvironmentFilterSpecification maskNone()
Turn off global masking. Items can be masked by executing any of the exclude methods.- Returns:
- this
-
exclude
@NotNull public @NotNull EnvironmentFilterSpecification exclude(@NotNull @NotNull java.util.function.Predicate<java.lang.String> keyPredicate)
Adds a predicate to test property keys. If themaskAll()flag is set then this will be used for exceptions (values in clear-text). If themaskNone()flag is set then this will be those values that are masked.- Parameters:
keyPredicate- A predicate to match against property keys for masking- Returns:
- this
-
exclude
@NotNull public @NotNull EnvironmentFilterSpecification exclude(@NotNull @NotNull java.lang.String... keys)
Adds literal strings to the list of excluded keys. If themaskAll()flag is set then this list will be used for exceptions (values in clear-text). If themaskNone()flag is set then this list will be those values that are masked.- Parameters:
keys- Literal keys that should be excluded- Returns:
- this
-
exclude
@NotNull public @NotNull EnvironmentFilterSpecification exclude(@NotNull @NotNull java.util.regex.Pattern... keyPatterns)
Adds regular expression patterns to the list of known masks. If themaskAll()flag is set then this list will be used for exceptions (values in clear-text). If themaskNone()flag is set then this list will be those values that are masked. Patterns must match the entire property key.- Parameters:
keyPatterns- The patterns used to compare keys to exclude them- Returns:
- this
-
legacyMasking
@NotNull public @NotNull EnvironmentFilterSpecification legacyMasking()
Configures the key masking to behave as it did prior to 3.3.0.- Returns:
- this
-
-