-
- All Superinterfaces:
Source
,Supplier<OverrideSource>
- All Known Implementing Classes:
ClasspathOverrideSource
,FileOverrideSource
,InMemoryOverrideSource
,UrlOverrideSource
public interface OverrideSource extends Source, Supplier<OverrideSource>
Source of config override settings.A config override setting provides an alternate, or overriding, value for a config element based on the element's key. Implementations of this interface furnish override settings as
OverrideSource.OverrideData
objects.The
OverrideSource.OverrideData.data
method returns aList
of pairs, each of which contains aPredicate
which evaluates the config key and aString
which is the overriding value to be used if the predicate istrue
. The config system applies overrides before it appliesfilters
, and it applies only the first matching override it finds.The config override mechanism affects existing
Config
nodes that come from aConfigSource
. The override mechanism cannot create additionalConfig
nodes, only modify existing ones.- See Also:
OverrideSource.OverrideData
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
OverrideSource.OverrideData
Group of config override settings.-
Nested classes/interfaces inherited from interface io.helidon.config.spi.Source
Source.Builder<B extends Source.Builder<B>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default OverrideSource
get()
Optional<ConfigContent.OverrideContent>
load()
Load override data from the underlying source.-
Methods inherited from interface io.helidon.config.spi.Source
description, exists, optional, retryPolicy
-
-
-
-
Method Detail
-
get
default OverrideSource get()
- Specified by:
get
in interfaceSupplier<OverrideSource>
-
load
Optional<ConfigContent.OverrideContent> load() throws ConfigException
Load override data from the underlying source.- Returns:
- override data if present, empty otherwise
- Throws:
ConfigException
- in case the loading of data failed
-
-