See: Description
| Interface | Description |
|---|---|
| Config |
Immutable tree-structured configuration.
|
| Config.Builder |
Config Builder. |
| Config.Context |
Context associated with specific
Config node that allows to access the last loaded instance of the node
or to request reloading of whole configuration. |
| Config.Key |
Object represents fully-qualified key of config node.
|
| Config.Value.None |
Class that represents not-set default values.
|
| ConfigMapper<T> |
Contextual mapper of a configuration hierarchy to a Java type.
|
| ConfigSources.MergingStrategy |
An algorithm for combining multiple
ConfigNode.ObjectNode root nodes
into a single ConfigNode.ObjectNode root node. |
| Class | Description |
|---|---|
| ConfigFilters |
Class provides access to built-in
ConfigFilter implementations. |
| ConfigFilters.ValueResolvingBuilder |
A builder for value reference resolving filter.
|
| ConfigHelper |
Common Configuration utilities.
|
| ConfigMappers |
Utility methods for converting configuration to Java types.
|
| ConfigParsers |
Provides access to built-in
ConfigParser implementations. |
| ConfigSources |
Provides access to built-in
ConfigSource implementations. |
| ConfigSources.CompositeBuilder |
Builder of a
ConfigSource that encapsulates multiple separate
ConfigSources. |
| ConfigSources.MapBuilder |
Builder of a
ConfigSource based on a Map containing
config entries. |
| OverrideSources |
Class provides access to built-in
OverrideSource implementations. |
| PollingStrategies |
Built-in
PollingStrategy implementations. |
| PollingStrategies.FilesystemWatchBuilder |
A builder for a filesystem watch polling strategy.
|
| PollingStrategies.ScheduledBuilder |
A builder for a scheduled polling strategy.
|
| RetryPolicies |
Class provides access to built-in
RetryPolicy implementations. |
| RetryPolicies.Builder |
A builder of the default
RetryPolicy. |
| Enum | Description |
|---|---|
| Config.Type |
Configuration node types.
|
| Exception | Description |
|---|---|
| ConfigException |
Exception is thrown by
Config implementations. |
| ConfigMappingException |
Configuration value mapping exception.
|
| MissingValueException |
Exception representing a specific failures related to a missing configuration value.
|
| Annotation Type | Description |
|---|---|
| Config.Transient |
Annotation used to exclude JavaBean property, method or constructor from JavaBean deserialization support.
|
| Config.Value |
Annotation used to customize behaviour of JavaBean deserialization support, generic
ConfigMapper
implementation. |
Config.create()) or from specified ConfigSources
(using Config.Builder).
The default sources include all of the following, in order:
application.yamlapplication.conf (HOCON format)application.jsonapplication.propertiesConfigParser.
See Config for further information.
Config class.
Once loaded, configuration information is available to the program as Config
nodes in a tree. Each node has:
Config.Key representing
the full path from the root to the node, and Config.type() method
returns an enum value Config.Type that tells how the
program should interpret the content of the node.
| Type | Meaning | Useful Config Methods |
|---|---|---|
| VALUE | value node with an optional String value |
value() |
| LIST | list of indexed nodes | asList, asStringList, asNodeList
|
| OBJECT | object node with, possibly, child nodes | nodeList, asNodeList
|
Optional<String>, the program can also
have the node convert its String value to a boolean, int,
long, double, a List of any of these,
or an Optional of any of these.
The program can provide its own ConfigMapper implementations
to deal with more complicated value mapping needs. See also Config.Builder.addMapper(java.lang.Class<T>, io.helidon.config.ConfigMapper<T>).
List.
The program can navigate directly to a given subnode using the
Config.get(java.lang.String) method and passing the dotted path to the subnode.
The Config.traverse() methods return a stream of nodes
in depth-first order.
Map of dotted names to String values
for a node's entire subtree using Config.asMap().
FunctionalInterface
to Config.onChange(java.util.function.Function<io.helidon.config.Config, java.lang.Boolean>).
Config class provides many methods for converting config
String values to Java primitives and simple Java types, as well as
mapping parts of the config tree to Lists and Maps.
The application can convert config data to arbitrary types using the
Config#as method, and can provide its own conversions to handle
custom types by implementing the
ConfigMapper interface and registering the mapper
with a Config.Builder using the addMapper method.
If the Config.as method finds no matching registered mapper it will
follow the logic described in the ConfigMapperManager class to try to
map the configuration automatically.
Configuration SPICopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.