Interface ConfigSource

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

@Contract 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.

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
Each of the interfaces mentioned above also has an inner class with a builder interface, if any configuration is needed. The 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: