Class MapConfigSource.MapBuilder<T extends MapConfigSource.MapBuilder<T>>
java.lang.Object
io.helidon.config.AbstractSourceBuilder<T,Void>
io.helidon.config.AbstractConfigSourceBuilder<T,Void>
io.helidon.config.MapConfigSource.MapBuilder<T>
- Type Parameters:
T- type of the implementing builder
- All Implemented Interfaces:
Builder<MapConfigSource.Builder, MapConfigSource>, PollableSource.Builder<T>, Source.Builder<T>, Supplier<MapConfigSource>
- Direct Known Subclasses:
ConfigSources.SystemPropertiesConfigSource.Builder, MapConfigSource.Builder
- Enclosing class:
MapConfigSource
public abstract static class MapConfigSource.MapBuilder<T extends MapConfigSource.MapBuilder<T>>
extends AbstractConfigSourceBuilder<T,Void>
implements Builder<MapConfigSource.Builder, MapConfigSource>, PollableSource.Builder<T>
An abstract fluent API builder for
MapConfigSource.
If you want to extend MapConfigSource, you can use this class as a base for
your own builder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<?, ?> map()Map used as data of this config source.Map to be used as config source underlying data.Name of this source.pollingStrategy(PollingStrategy pollingStrategy) Configure a polling strategy.properties(Properties properties) Properties to be used as config source underlying data.protected StringName of the source.Methods inherited from class AbstractConfigSourceBuilder
config, mediaType, mediaTypeMapping, parser, parserMappingModifier and TypeMethodDescriptionprotected TConfigure builder from meta configuration.protected TMedia type if this is aParsableSourceand explicit media type is configured.mediaTypeMapping(Function<Config.Key, Optional<MediaType>> mediaTypeMapping) Sets a function that maps keys to media type.protected Tparser(ConfigParser parser) A parser if this is aParsableSourceand explicit parser is configured.parserMapping(Function<Config.Key, Optional<ConfigParser>> parserMapping) Sets a function that maps keys to a parser.Methods inherited from class AbstractSourceBuilder
changeWatcher, optional, retryPolicyModifier and TypeMethodDescriptionprotected TchangeWatcher(ChangeWatcher<Void> changeWatcher) Configure a change watcher.optional(boolean optional) Whether the source is optional or not.retryPolicy(Supplier<? extends RetryPolicy> policy) Configure a retry policy to be used with this source.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
build, get, identity, updateModifier and TypeMethodDescriptionbuild()Build the instance from this builder.default MapConfigSourceget()default MapConfigSource.Builderidentity()Instance of this builder as the correct type.default MapConfigSource.Builderupdate(Consumer<MapConfigSource.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface PollableSource.Builder
pollingStrategyModifier and TypeMethodDescriptiondefault TpollingStrategy(Supplier<? extends PollingStrategy> pollingStrategy) Configure the polling strategy to use.Methods inherited from interface Source.Builder
optional
-
Constructor Details
-
MapBuilder
protected MapBuilder()Creat a new builder instance.
-
-
Method Details
-
map
-
properties
Properties to be used as config source underlying data. The same instance is kept by the config source, to support polling.- Parameters:
properties- properties to use- Returns:
- updated builder instance
-
name
-
pollingStrategy
Description copied from class:AbstractSourceBuilderConfigure a polling strategy. This method must be exposed by builders of sources that support polling. If you see this method as being protected in your builder, the source has removed support for polling, such asClasspathConfigSource.- Specified by:
pollingStrategyin interfacePollableSource.Builder<T extends MapConfigSource.MapBuilder<T>>- Overrides:
pollingStrategyin classAbstractSourceBuilder<T extends MapConfigSource.MapBuilder<T>, Void>- Parameters:
pollingStrategy- polling strategy to use- Returns:
- updated builder instance
-
map
-
sourceName
-