simple.http.load
Class Configuration

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by simple.http.load.Configuration
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class Configuration
extends java.util.Properties

The Configuration object is used to collect property values for services loaded using the mapper engine. The mapper engine uses an XML configuration file that allows properties to be specified for a service instance. These properties can be grouped into named sections, this represents that structure.

Author:
Niall Gallagher
See Also:
MapperEngine, Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
Configuration()
          Constructor for the Configuration object.
Configuration(java.util.Properties data)
          Constructor for the Configuration object.
 
Method Summary
 java.util.Properties getSection(java.lang.String name)
          This is used to acquire the properties for a named section.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Constructor for the Configuration object. This is used to create an empty configuration object. Property values and sections can be added using setter methods.


Configuration

public Configuration(java.util.Properties data)
Constructor for the Configuration object. This is used to create a configuration object that copies the details from the provided properties object. This can also be used as a copy constructor.

Parameters:
data - this is a collection of properties to add
Method Detail

getSection

public java.util.Properties getSection(java.lang.String name)
This is used to acquire the properties for a named section. If the configuration does not contain the section then this will return an empty set of properties rather than null.

Parameters:
name - this is the name of the section to acquire
Returns:
this returns the properties for the section