@Experimental(value="ConfigSource API Enhancements")
public interface ConfigSourceFactory
ConfigSourceFactory allows to initialize a ConfigSource, with access to the current
ConfigSourceContext.
The provided ConfigSource is initialized in priority order and the current ConfigSourceContext has
access to all previous initialized ConfigSources. This allows the factory to configure the
ConfigSource with all other ConfigSources available, except for ConfigSources initialized by
another ConfigSourceFactory.
Instances of this interface will be discovered by SmallRyeConfigBuilder.withSources(ConfigSourceFactory...)
via the ServiceLoader mechanism and can be registered by providing a
META-INF/services/io.smallrye.config.ConfigSourceFactory which contains the fully qualified class name of the
custom ConfigSourceFactory implementation.
| Modifier and Type | Method and Description |
|---|---|
Iterable<org.eclipse.microprofile.config.spi.ConfigSource> |
getConfigSources(ConfigSourceContext context) |
default OptionalInt |
getPriority()
Returns the factory priority.
|
Iterable<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSources(ConfigSourceContext context)
default OptionalInt getPriority()
ConfigSource will use its own ordinal to
determine the config lookup order.Copyright © 2018–2020. All rights reserved.