Module io.helidon.config
Package io.helidon.config
Class MapConfigSource.MapBuilder<T extends MapConfigSource.MapBuilder<T>>
- java.lang.Object
-
- io.helidon.config.AbstractSourceBuilder<B,U>
-
- 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>
,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>, PollableSource.Builder<T>
An abstract fluent API builder forMapConfigSource
. If you want to extendMapConfigSource
, you can use this class as a base for your own builder.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MapBuilder()
Creat a new builder instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<?,?>
map()
Map used as data of this config source.T
map(Map<String,String> map)
Map to be used as config source underlying data.T
name(String sourceName)
Name of this source.T
pollingStrategy(PollingStrategy pollingStrategy)
Configure a polling strategy.T
properties(Properties properties)
Properties to be used as config source underlying data.protected String
sourceName()
Name of the source.-
Methods inherited from class io.helidon.config.AbstractConfigSourceBuilder
config, mediaType, mediaTypeMapping, parser, parserMapping
-
Methods inherited from class io.helidon.config.AbstractSourceBuilder
changeWatcher, optional, retryPolicy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.config.spi.PollableSource.Builder
pollingStrategy
-
Methods inherited from interface io.helidon.config.spi.Source.Builder
optional, optional, retryPolicy
-
-
-
-
Method Detail
-
map
public T map(Map<String,String> map)
Map to be used as config source underlying data. The same instance is kept by the config source, to support polling.- Parameters:
map
- map to use- Returns:
- updated builder instance
-
properties
public T properties(Properties 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
public T name(String sourceName)
Name of this source.- Parameters:
sourceName
- name of this source- Returns:
- updated builder instance
-
pollingStrategy
public T pollingStrategy(PollingStrategy pollingStrategy)
Description copied from class:AbstractSourceBuilder
Configure 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:
pollingStrategy
in interfacePollableSource.Builder<T extends MapConfigSource.MapBuilder<T>>
- Overrides:
pollingStrategy
in classAbstractSourceBuilder<T extends MapConfigSource.MapBuilder<T>,Void>
- Parameters:
pollingStrategy
- polling strategy to use- Returns:
- updated builder instance
-
map
protected Map<?,?> map()
Map used as data of this config source.- Returns:
- map with the data
-
sourceName
protected String sourceName()
Name of the source.- Returns:
- name
-
-