Interface Source
- All Known Subinterfaces:
ConfigSource, NodeConfigSource, OverrideSource, ParsableSource
- All Known Implementing Classes:
AbstractConfigSource, AbstractSource, ClasspathConfigSource, ClasspathOverrideSource, ConfigSources.SystemPropertiesConfigSource, DirectoryConfigSource, FileConfigSource, FileOverrideSource, InMemoryOverrideSource, MapConfigSource, PrefixedConfigSource, UrlConfigSource, UrlOverrideSource
public interface Source
Source of data.
The actual loading of the data depends on the type of the source.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceSource.Builder<B extends Source.Builder<B>>Configurable options of aSource. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringShort, human-readable summary referring to the underlying source.default booleanexists()If the underlying data exist at this time.default booleanoptional()Whether this source is optional.default Optional<RetryPolicy> Retry policy configured on this config source.
-
Method Details
-
description
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
Sourceprovides.Default is the implementation class simple name with any
"Source"suffix removed.- Returns:
- description of the source
-
exists
default boolean exists()If the underlying data exist at this time. This is to prevent us loading such a source if we know it does not exist.- Returns:
trueif the source exists,falseotherwise
-
retryPolicy
Retry policy configured on this config source.- Returns:
- configured retry policy
-
optional
default boolean optional()Whether this source is optional.- Returns:
- return
truefor optional source, returnsfalseby default
-