Interface ConfigurationSource

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ConfigurationSource
    Configuration property source which provides configuration values from a specific place. Samples may include properties file supported by frameworks or other source. Note that environment configuration (environment variables and system properties) are supported by default and don't need a source implementation.
    • Method Detail

      • getProperties

        Map<String,​String> getProperties​(String source)
        Returns all properties (name and value) which names start with given path. Null (or empty) path indicate that all properties should be returned. Example:

        With following configuration properties:

        • azure.sdk.foo = 1
        • azure.sdk.bar.baz = 2

        ConfigurationSource implementation must the following behavior:

        • getProperties(null must return both properties
        • getProperties("azure.sdk") must return both properties
        • getProperties("azure.sdk.foo") must return {"azure.sdk.foo", "1"}
        • getProperties("azure.sdk.ba") must return empty map
        Parameters:
        source - property name prefix
        Returns:
        Map of properties under given path.