-
- All Superinterfaces:
Source
,Supplier<ConfigSource>
- All Known Subinterfaces:
NodeConfigSource
- All Known Implementing Classes:
AbstractConfigSource
,ClasspathConfigSource
,ConfigSources.SystemPropertiesConfigSource
,DirectoryConfigSource
,EtcdConfigSource
,FileConfigSource
,GitConfigSource
,MapConfigSource
,PrefixedConfigSource
,UrlConfigSource
public interface ConfigSource extends Supplier<ConfigSource>, Source
Source
of configuration. There is a set of interfaces that you can implement to support various aspect of a config source.Config sources by "eagerness" of loading of data. The config source either loads all data when asked to (and this is the preferred way for Helidon Config), or loads each key separately.
ParsableSource
- an eager source that provides an input stream with data to be parsed based on its content typeNodeConfigSource
- an eager source that provides aConfigNode.ObjectNode
with its configuration treeLazyConfigSource
- a lazy source that provides values key by key
Config sources by "mutability" of data. The config source may be immutable (default), or provide a means for change support
PollableSource
- a source that can generate a "stamp" of the data that can be used to check for possible changes in underlying data (such as file digest, a timestamp, data version)WatchableSource
- a source that is based on data that have a specific change watcher that can notify the config framework of changes without the need for regular polling (such as file)EventConfigSource
- a source that can directly notify about changes
AbstractConfigSource
implements a super set of all the configuration methods from all interfaces asprotected
, so you can use them in your implementation.AbstractConfigSourceBuilder
implements the configuration methods, so you can simply extend it with your builder and implement all the builders that make sense for your config source type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.config.spi.Source
Source.Builder<B extends Source.Builder<B>>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ConfigSource
get()
default void
init(ConfigContext context)
Initialize the config source with aConfigContext
.-
Methods inherited from interface io.helidon.config.spi.Source
description, exists, optional, retryPolicy
-
-
-
-
Method Detail
-
get
default ConfigSource get()
- Specified by:
get
in interfaceSupplier<ConfigSource>
-
init
default void init(ConfigContext context)
Initialize the config source with aConfigContext
.The method is executed during
Config
bootstrapping byConfig.Builder
.- Parameters:
context
- a config context
-
-