Package org.apache.synapse.config
Class SynapsePropertiesLoader
- java.lang.Object
-
- org.apache.synapse.config.SynapsePropertiesLoader
-
public class SynapsePropertiesLoader extends Object
Provides a Factory method load synapse properties. Cache the properties to make sure properties loading only is occurred onetime
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Boolean
getBooleanProperty(String name, Boolean def)
Get the boolean value of the property from the synapse properties.static String
getPropertyValue(String key, String defaultValue)
Load a value of the property from the synapse propertiesstatic Properties
loadSynapseProperties()
Loads the properties This happen only cached properties are null.static Properties
reloadSynapseProperties()
Reloading properties from file
-
-
-
Method Detail
-
loadSynapseProperties
public static Properties loadSynapseProperties()
Loads the properties This happen only cached properties are null.- Returns:
- Synapse Properties
-
reloadSynapseProperties
public static Properties reloadSynapseProperties()
Reloading properties from file- Returns:
- Reloaded properties
-
getPropertyValue
public static String getPropertyValue(String key, String defaultValue)
Load a value of the property from the synapse properties- Parameters:
key
- Key of the propertydefaultValue
- Default value- Returns:
- Value of the property
-
getBooleanProperty
public static Boolean getBooleanProperty(String name, Boolean def)
Get the boolean value of the property from the synapse properties.- Parameters:
name
- name of the config propertydef
- default value to return if the property is not set- Returns:
- the value of the property to be used
-
-