public class PropertyConfigurationLoader extends Object implements ConfigurationLoader
EventServiceConfigurationFactory
to load the EventServiceConfiguration
with a properties file.
The default name of the properties is "eventservice.properties". For that file will be searched if not other defined.Constructor and Description |
---|
PropertyConfigurationLoader()
Creates a
PropertyConfigurationLoader with the default properties ("eventservice.properties"). |
PropertyConfigurationLoader(String aPropertyName)
Creates a
PropertyConfigurationLoader with a properties file. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object anObject) |
int |
hashCode() |
boolean |
isAvailable()
Checks if the configuration is available and can be loaded.
|
EventServiceConfiguration |
load()
Loads the configuration with the loader.
|
public PropertyConfigurationLoader()
PropertyConfigurationLoader
with the default properties ("eventservice.properties").public PropertyConfigurationLoader(String aPropertyName)
PropertyConfigurationLoader
with a properties file.aPropertyName
- properties file to load (the location must be attached to the classpath)public boolean isAvailable()
ConfigurationLoader.load()
shouldn't called. In the case of PropertyConfigurationLoader
the method
returns true when the location of the properties file is attached to the classpath.isAvailable
in interface ConfigurationLoader
public EventServiceConfiguration load()
load
in interface ConfigurationLoader
EventServiceConfiguration
the loaded configuration or NULL if the
properties file couldn't found with the classpath.ConfigurationException
- occurs when the configuration can't be loaded or if it contains unreadable values.Copyright © 2012. All Rights Reserved.