- java.lang.Object
-
- io.helidon.config.AbstractSourceBuilder<UrlOverrideSource.Builder,URL>
-
- io.helidon.config.UrlOverrideSource.Builder
-
- All Implemented Interfaces:
Builder<UrlOverrideSource>,PollableSource.Builder<UrlOverrideSource.Builder>,Source.Builder<UrlOverrideSource.Builder>,WatchableSource.Builder<UrlOverrideSource.Builder,URL>,Supplier<UrlOverrideSource>
- Enclosing class:
- UrlOverrideSource
public static final class UrlOverrideSource.Builder extends AbstractSourceBuilder<UrlOverrideSource.Builder,URL> implements PollableSource.Builder<UrlOverrideSource.Builder>, WatchableSource.Builder<UrlOverrideSource.Builder,URL>, Builder<UrlOverrideSource>
Url Override Source Builder.It allows to configure following properties:
url- configuration endpoint URL;mandatory- is existence of configuration resource mandatory (by default) or isoptional?media-type- configuration content media type to be used to look for appropriateConfigParser;parser- or directly setConfigParserinstance to be used to parse the source;
If
media-typenot set it uses HTTP response headercontent-type. Ifmedia-typenot returned it tries to guess it from url suffix.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlOverrideSourcebuild()Builds new instance of Url ConfigSource.UrlOverrideSource.BuilderchangeWatcher(ChangeWatcher<URL> changeWatcher)Configure a change watcher.UrlOverrideSource.Builderconfig(Config metaConfig)Configure builder from meta configuration.UrlOverrideSource.BuilderpollingStrategy(PollingStrategy pollingStrategy)Configure a polling strategy.UrlOverrideSource.Builderurl(URL url)Configure the URL that is source of this overrides.-
Methods inherited from class io.helidon.config.AbstractSourceBuilder
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
-
-
-
-
Method Detail
-
build
public UrlOverrideSource build()
Builds new instance of Url ConfigSource.If
media-typenot set it tries to usecontent-typeresponse header or guesses it from file extension.- Specified by:
buildin interfaceBuilder<UrlOverrideSource>- Returns:
- new instance of Url ConfigSource.
-
config
public UrlOverrideSource.Builder config(Config metaConfig)
Description copied from class:AbstractSourceBuilderConfigure builder from meta configuration.The following configuration options are supported:
Optional configuration parameters key default value description optional falseConfigure to trueif this source should not fail configuration setup when underlying data is missing.polling-strategy No polling strategy is added by default Meta configuration of a polling strategy to be used with this source, add configuration to propertiessub node.change-watcher No change watcher is added by default Meta configuration of a change watcher to be used with this source, add configuration to propertiessub node.retry-policy No retry policy is added by default Meta configuration of a retry policy to be used to load this source, add configuration to propertiessub node.- Overrides:
configin classAbstractSourceBuilder<UrlOverrideSource.Builder,URL>- Parameters:
metaConfig- meta configuration of this source- Returns:
- updated builder instance
-
url
public UrlOverrideSource.Builder url(URL url)
Configure the URL that is source of this overrides.- Parameters:
url- url of the resource to load- Returns:
- updated builder instance
-
changeWatcher
public UrlOverrideSource.Builder changeWatcher(ChangeWatcher<URL> changeWatcher)
Description copied from class:AbstractSourceBuilderConfigure a change watcher. This method must be exposed by builders of sources that change watching (WatchableSource). The type of the change watcher must match the type of the target of this source.- Specified by:
changeWatcherin interfaceWatchableSource.Builder<UrlOverrideSource.Builder,URL>- Overrides:
changeWatcherin classAbstractSourceBuilder<UrlOverrideSource.Builder,URL>- Parameters:
changeWatcher- change watcher to use, such asFileSystemWatcher- Returns:
- updated builder instance
-
pollingStrategy
public UrlOverrideSource.Builder pollingStrategy(PollingStrategy 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<UrlOverrideSource.Builder>- Overrides:
pollingStrategyin classAbstractSourceBuilder<UrlOverrideSource.Builder,URL>- Parameters:
pollingStrategy- polling strategy to use- Returns:
- updated builder instance
-
-