Class AbstractSource

java.lang.Object
io.helidon.config.AbstractSource
All Implemented Interfaces:
Source
Direct Known Subclasses:
AbstractConfigSource, ClasspathOverrideSource, FileOverrideSource, UrlOverrideSource

public class AbstractSource extends Object implements Source
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:
  • Constructor Details

    • AbstractSource

      protected AbstractSource(AbstractSourceBuilder<?,?> builder)
      A new instance configured from the provided builder. The builder is used to set the following:
      Parameters:
      builder - builder used to read the configuration options
  • Method Details

    • retryPolicy

      public Optional<RetryPolicy> retryPolicy()
      Description copied from interface: Source
      Retry policy configured on this config source.
      Specified by:
      retryPolicy in interface Source
      Returns:
      configured retry policy
    • optional

      public boolean optional()
      Description copied from interface: Source
      Whether this source is optional.
      Specified by:
      optional in interface Source
      Returns:
      return true for optional source, returns false by default
    • pollingStrategy

      protected Optional<PollingStrategy> pollingStrategy()
      A polling strategy of this source, if it implements PollableSource and has one configured.
      Returns:
      polling strategy if any configured
    • changeWatcher

      protected Optional<ChangeWatcher<Object>> changeWatcher()
      A change watcher of this source, if it implements WatchableSource and has one configured.
      Returns:
      change watcher if any configured
    • uid

      protected String uid()
      Returns universal id of source to be used to construct description().
      Returns:
      universal id of source
    • description

      public String 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 interface Source
      Returns:
      description of the source