Interface ConfigSource

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default boolean failOnErrors()
      If the source should fail on errors.
      java.lang.String format()
      The format of the config source, for example this can be envVars, the extension of a file (properties, json, ect).
      Tags getTags()
      A source can have a set of tags that apply to all nodes in the source.
      boolean hasList()
      If this config source provides a list of config values.
      boolean hasStream()
      If this config source has a stream to load from.
      java.util.UUID id()
      Id that represents this source as unique.
      java.util.List<Pair<java.lang.String,​java.lang.String>> loadList()
      provides a list of config values.
      java.io.InputStream loadStream()
      If this config source has a stream, this will return the stream of data.
      java.lang.String name()
      human-readable name for logging.
    • Method Detail

      • hasStream

        boolean hasStream()
        If this config source has a stream to load from.
        Returns:
        if this config source has a stream to load from
      • loadStream

        java.io.InputStream loadStream()
                                throws GestaltException
        If this config source has a stream, this will return the stream of data. Or if not supported it will throw an exception.
        Returns:
        input stream of data
        Throws:
        GestaltException - if there are any IO or if this is an unsupported operation
      • hasList

        boolean hasList()
        If this config source provides a list of config values.
        Returns:
        if this config source provides a list of config values
      • loadList

        java.util.List<Pair<java.lang.String,​java.lang.String>> loadList()
                                                                        throws GestaltException
        provides a list of config values.
        Returns:
        provides a list of config values
        Throws:
        GestaltException - if there are any IO or if this is an unsupported operation
      • format

        java.lang.String format()
        The format of the config source, for example this can be envVars, the extension of a file (properties, json, ect).
        Returns:
        The format of the config source
      • name

        java.lang.String name()
        human-readable name for logging.
        Returns:
        human-readable name for logging.
      • id

        java.util.UUID id()
        Id that represents this source as unique.
        Returns:
        id
      • getTags

        Tags getTags()
        A source can have a set of tags that apply to all nodes in the source.
        Returns:
        tags assigned to the source
      • failOnErrors

        default boolean failOnErrors()
        If the source should fail on errors.
        Returns:
        If the source should fail on errors