Class ConfigPropertiesReader

  extended by com.cloudtran.util.ConfigPropertiesReader
All Implemented Interfaces:

public class ConfigPropertiesReader
extends Object
implements IConfigPropertiesReader

This class is the default custom config property reader for CloudTran. The main feature of this class is that it allows default configuration properties to be specified in various classpath resources named "". In addition, to help testing, config properties can be specified on a per-user basis so developers can test configurations on the same LAN without interference.

These properties override the built-in defaults but can themselves be overridden by -D system properties.

In detail: the priority for properties specified to CloudTran, highest priority first, is as follows:

Constructor Summary
Method Summary
 Properties getCustomProperties()
          Call this method to load the cusomtconfiguration properties.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ConfigPropertiesReader()
Method Detail


public Properties getCustomProperties()
Call this method to load the cusomtconfiguration properties. See the class description for the action of this method. If your application needs to specifically set properties for its own operation, it should normally use a "" file as the way of doing this. This will easily establish a baseline set of configuration properties for the application. If it becomes necessary to allow other users to use "", so this is not an option for defining the baseline properties, then the application can set those properties by defining in System properties *before* calling this method. The first call to this method establishes the CloudTran configuration properties. Subsequent calls return the same set of properties - even if you have set system properties in the meantime.

Specified by:
getCustomProperties in interface IConfigPropertiesReader