All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.core.util.ConfigurationSource Maven / Gradle / Ivy

There is a newer version: 1.54.1
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.core.util;

import java.util.Map;

/**
 * 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.
 */
@FunctionalInterface
public interface ConfigurationSource {
    /**
     * 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
  • *
* *

* {@link ConfigurationSource} implementation must the following behavior: *

    *
  • {@code getProperties(null} must return both properties
  • *
  • {@code getProperties("azure.sdk")} must return both properties
  • *
  • {@code getProperties("azure.sdk.foo")} must return {"azure.sdk.foo", "1"}
  • *
  • {@code getProperties("azure.sdk.ba")} must return empty map
  • *
* * @param source property name prefix * @return Map of properties under given path. */ Map getProperties(String source); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy