Interface ConfigLoader

  • All Known Implementing Classes:
    EnvironmentVarsLoader, MapConfigLoader, PropertyLoader

    public interface ConfigLoader
    Interface for a config loader. Allows a loader to specify what types of configs it will load, property, environment variables, ect.. Each source has a format, and this will load the matching sources.

    A config loader knows how to load a specific format, so a property loader will load a stream of properties. An Environment Vars loader will load a list of Environment Variables.

    • Method Detail

      • name

        java.lang.String name()
        Name of the config loader.
        Returns:
        name
      • accepts

        boolean accepts​(java.lang.String format)
        True if the config loader accepts the format.
        Parameters:
        format - config format.
        Returns:
        True if the config loader accepts the format.
      • applyConfig

        default void applyConfig​(GestaltConfig config)
        Apply the GestaltConfig to the Config Loader. Needed when building via the ServiceLoader It is a default method as most Config Loaders don't need to apply configs.
        Parameters:
        config - GestaltConfig to update the ConfigLoader