Package com.azure.core.util
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.
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 Summary
Modifier and TypeMethodDescriptiongetProperties(String source) Returns all properties (name and value) which names start with given path.
-
Method Details
-
getProperties
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
ConfigurationSourceimplementation must the following behavior:getProperties(nullmust return both propertiesgetProperties("azure.sdk")must return both propertiesgetProperties("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.
-