Package com.avanza.astrix.config
Class PropertiesConfigSource
- java.lang.Object
-
- com.avanza.astrix.config.PropertiesConfigSource
-
- All Implemented Interfaces:
ConfigSource
public class PropertiesConfigSource extends Object implements ConfigSource
ConfigSourceimplementation delegating all property lookup to aPropertiesinstance.- Author:
- Elias Lindholm (elilin)
-
-
Constructor Summary
Constructors Constructor Description PropertiesConfigSource(Properties properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget(String propertyName)Reads a property from this ConfigSource.static ConfigSourceoptionalClasspathPropertiesFile(String fileName)StringtoString()
-
-
-
Constructor Detail
-
PropertiesConfigSource
public PropertiesConfigSource(Properties properties)
-
-
Method Detail
-
get
public String get(String propertyName)
Description copied from interface:ConfigSourceReads a property from this ConfigSource.- Specified by:
getin interfaceConfigSource- Parameters:
propertyName- - The name of the property to read- Returns:
- The value of the given property, or null if this ConfigSource does not contain a value for the given property
-
optionalClasspathPropertiesFile
public static ConfigSource optionalClasspathPropertiesFile(String fileName)
-
-