| Package | Description |
|---|---|
| io.helidon.config |
Provides interfaces and classes for loading and working with immutable, tree-structured
configuration data.
|
| io.helidon.config.spi |
Configuration SPI that defines the behavior developers can implement to extend the config system.
|
| Modifier and Type | Method and Description |
|---|---|
Config |
Config.Builder.build()
Builds new instance of
Config. |
static Config |
Config.create()
Returns a new default
Config loaded using one of the
configuration files available on the classpath and/or using the runtime
environment. |
static Config |
Config.create(Supplier<ConfigSource>... configSources)
Creates a new
Config loaded from environment variables, system
properties, and the specified ConfigSources. |
Config |
Config.detach()
Returns a copy of the
Config node with no parent. |
static Config |
Config.empty()
Returns empty instance of
Config. |
static Config |
Config.empty(Config config)
Create an empty configuration with mappers copied from another config.
|
Config |
Config.get(Config.Key key)
Returns the single sub-node for the specified sub-key.
|
default Config |
Config.get(String key)
Returns the single sub-node for the specified sub-key.
|
Config |
Config.Context.last()
|
static Config |
Config.loadSourcesFrom(Supplier<ConfigSource>... metaSources)
Creates a new
Config loaded from the specified
ConfigSources representing meta-configurations. |
Config |
Config.Context.reload()
|
| Modifier and Type | Method and Description |
|---|---|
default ConfigValue<Config> |
Config.asNode()
Returns existing current config node as a
Optional instance
or Optional.empty() in case of Config.Type.MISSING node. |
ConfigValue<List<Config>> |
Config.asNodeList()
Returns a list of child
Config nodes if the node is Config.Type.OBJECT. |
Function<Config,ConfigFilter> |
ConfigFilters.ValueResolvingBuilder.build()
Creates a function of values reference resolving.
|
default Flow.Publisher<Config> |
Config.changes()
Deprecated.
|
Function<Config,ConfigFilter> |
ConfigFilters.ValueResolvingBuilder.get() |
default Stream<Config> |
Config.traverse()
Iterative deepening depth-first traversal of the node
and its subtree as a
Stream<Config>. |
Stream<Config> |
Config.traverse(Predicate<Config> predicate)
Iterative deepening depth-first traversal of the node
and its subtree as a
Stream<Config>, qualified by the specified
predicate. |
| Modifier and Type | Method and Description |
|---|---|
static ConfigFilters.ValueResolvingBuilder |
ConfigFilters.ValueResolvingBuilder.create(Config metaConfig)
Initializes config filter instance from configuration properties.
|
static ConfigSource |
ConfigSources.create(Config config)
Returns a
ConfigSource that contains the same configuration model
as the provided config. |
static PollingStrategies.ScheduledBuilder |
PollingStrategies.ScheduledBuilder.create(Config metaConfig)
Initializes polling strategy instance from configuration properties.
|
static RetryPolicies.Builder |
RetryPolicies.Builder.create(Config metaConfig)
Initializes retry policy instance from configuration properties.
|
static Config |
Config.empty(Config config)
Create an empty configuration with mappers copied from another config.
|
static ConfigSources.CompositeBuilder |
ConfigSources.load(Config metaConfig)
Provides a
ConfigSources.CompositeBuilder for creating a composite
ConfigSource based on the ConfigSources returned by the
provided meta-configuration. |
Config.Builder |
Config.Builder.mappersFrom(Config config)
Add mappers from another config instance.
|
static Map<String,String> |
ConfigMappers.toMap(Config config)
Transform all leaf nodes (values) into Map instance.
|
static Properties |
ConfigMappers.toProperties(Config config)
Transform all leaf nodes (values) into Properties instance.
|
| Modifier and Type | Method and Description |
|---|---|
Config.Builder |
Config.Builder.addFilter(Function<Config,ConfigFilter> configFilterProvider)
|
Config.Builder |
Config.Builder.addFilter(Supplier<Function<Config,ConfigFilter>> configFilterSupplier)
|
<T> Config.Builder |
Config.Builder.addMapper(GenericType<T> type,
Function<Config,T> mapper)
Register a mapping function for specified
GenericType. |
<T> Config.Builder |
Config.Builder.addMapper(Class<T> type,
Function<Config,T> mapper)
Registers mapping function for specified
type. |
<T> ConfigValue<T> |
Config.as(Function<Config,T> mapper)
Typed value as a
ConfigValue created from factory method. |
<T> ConfigValue<List<T>> |
Config.asList(Function<Config,T> mapper)
Returns this node as a list converting each list value using the provided mapper.
|
default void |
Config.ifExists(Consumer<Config> action)
Performs the given action with the config node if node
exists, otherwise does nothing. |
default void |
Config.onChange(Consumer<Config> onChangeConsumer)
Register a
Consumer that is invoked each time a change occurs on whole Config or on a particular Config node. |
default void |
Config.onChange(Function<Config,Boolean> onNextFunction)
Deprecated.
use
onChange(Consumer) instead |
Stream<Config> |
Config.traverse(Predicate<Config> predicate)
Iterative deepening depth-first traversal of the node
and its subtree as a
Stream<Config>, qualified by the specified
predicate. |
| Modifier and Type | Method and Description |
|---|---|
default Map<GenericType<?>,BiFunction<Config,ConfigMapper,?>> |
ConfigMapperProvider.genericTypeMappers()
Returns a map of mapper functions associated with appropriate target type (
GenericType<?>. |
default <T> Optional<BiFunction<Config,ConfigMapper,T>> |
ConfigMapperProvider.mapper(GenericType<T> type)
Mapper for a specific generic type.
|
default <T> Optional<Function<Config,T>> |
ConfigMapperProvider.mapper(Class<T> type)
A simple mapping function from config node to a typed value based on the expected class.
|
Map<Class<?>,Function<Config,?>> |
ConfigMapperProvider.mappers()
Returns a map of mapper functions associated with appropriate target type (
Class<?>. |
| Modifier and Type | Method and Description |
|---|---|
static ConfigSource |
ConfigSource.create(Config metaConfig)
Initializes a
ConfigSource from meta-configuration. |
static RetryPolicy |
RetryPolicy.create(Config metaConfig)
Constructs a
RetryPolicy from meta-configuration. |
protected B |
AbstractConfigSource.Builder.init(Config metaConfig)
Initialize builder from specified configuration properties.
|
protected B |
AbstractParsableConfigSource.Builder.init(Config metaConfig)
Initialize builder from specified configuration properties.
|
protected B |
AbstractSource.Builder.init(Config metaConfig)
Initialize builder from specified configuration properties.
|
default void |
ConfigFilter.init(Config config)
Initializes the filter using the
Config instance which the filter
will affect once Config.Builder.build completes. |
<T> T |
ConfigMapper.map(Config config,
GenericType<T> type)
Convert the specified
Config node into the target type specified by GenericType. |
<T> T |
ConfigMapper.map(Config config,
Class<T> type)
Converts the specified
Config node to the target type. |
Copyright © 2018–2019 Oracle Corporation. All rights reserved.