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
ModifierConstructorDescriptionprotected
AbstractSource
(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 implementsWatchableSource
and has one configured.Short, human-readable summary referring to the underlying source.boolean
optional()
Whether this source is optional.protected Optional
<PollingStrategy> A polling strategy of this source, if it implementsPollableSource
and has one configured.Retry policy configured on this config source.protected String
uid()
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:Source
Retry policy configured on this config source.- Specified by:
retryPolicy
in interfaceSource
- Returns:
- configured retry policy
-
optional
public boolean optional()Description copied from interface:Source
Whether this source is optional. -
pollingStrategy
A polling strategy of this source, if it implementsPollableSource
and has one configured.- Returns:
- polling strategy if any configured
-
changeWatcher
A change watcher of this source, if it implementsWatchableSource
and 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:Source
Short, 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
Source
provides.Default is the implementation class simple name with any
"Source"
suffix removed.- Specified by:
description
in interfaceSource
- Returns:
- description of the source
-