java.lang.Object
io.helidon.config.AbstractSource
- All Implemented Interfaces:
Source
- Direct Known Subclasses:
AbstractConfigSource,ClasspathOverrideSource,FileOverrideSource,UrlOverrideSource
Source options as a super set of all possible combinations of source implementation.
When used as a base class, together with
AbstractSourceBuilder, you can set up any
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>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSource(AbstractSourceBuilder<?, ?> builder) A new instance configured from the provided builder. -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<ChangeWatcher<Object>> A change watcher of this source, if it implementsWatchableSourceand has one configured.Short, human-readable summary referring to the underlying source.booleanoptional()Whether this source is optional.protected Optional<PollingStrategy> A polling strategy of this source, if it implementsPollableSourceand has one configured.Retry policy configured on this config source.protected Stringuid()Returns universal id of source to be used to constructdescription().
-
Constructor Details
-
AbstractSource
A new instance configured from the provided builder. The builder is used to set the following:optional()- for any source, whether the content must be present, or is optionalretryPolicy()- for any source, policy used to retry attempts at reading the contentpollingStrategy()- forPollableSource, the polling strategy (if any)changeWatcher()- forWatchableSource, the change watcher (if any)
- Parameters:
builder- builder used to read the configuration options
-
-
Method Details
-
retryPolicy
Description copied from interface:SourceRetry policy configured on this config source.- Specified by:
retryPolicyin interfaceSource- Returns:
- configured retry policy
-
optional
public boolean optional()Description copied from interface:SourceWhether this source is optional. -
pollingStrategy
A polling strategy of this source, if it implementsPollableSourceand has one configured.- Returns:
- polling strategy if any configured
-
changeWatcher
A change watcher of this source, if it implementsWatchableSourceand has one configured.- Returns:
- change watcher if any configured
-
uid
Returns universal id of source to be used to constructdescription().- Returns:
- universal id of source
-
description
Description copied from interface:SourceShort, human-readable summary referring to the underlying source.For example, a file path or a URL or any other information that helps the user recognize the underlying origin of the data this
Sourceprovides.Default is the implementation class simple name with any
"Source"suffix removed.- Specified by:
descriptionin interfaceSource- Returns:
- description of the source
-