- All Superinterfaces:
Source,Supplier<ConfigSource>
- All Known Subinterfaces:
NodeConfigSource
- All Known Implementing Classes:
AbstractConfigSource,AbstractSecretBundleConfigSource,ClasspathConfigSource,ConfigSources.SystemPropertiesConfigSource,DirectoryConfigSource,EtcdConfigSource,FileConfigSource,GitConfigSource,MapConfigSource,PrefixedConfigSource,SecretBundleLazyConfigSource,SecretBundleNodeConfigSource,UrlConfigSource
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.ObjectNodewith 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
as protected, 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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.config.spi.Source
Source.Builder<B extends Source.Builder<B>> -
Method Summary
Modifier and TypeMethodDescriptiondefault ConfigSourceget()default voidinit(ConfigContext context) Initialize the config source with aConfigContext.Methods inherited from interface io.helidon.config.spi.Source
description, exists, optional, retryPolicy
-
Method Details
-
get
- Specified by:
getin interfaceSupplier<ConfigSource>
-
init
Initialize the config source with aConfigContext.The method is executed during
Configbootstrapping byConfig.Builder.- Parameters:
context- a config context
-