Class w3c.jigsaw.http.httpdProperties
All Packages Class Hierarchy This Package Previous Next Index
Class w3c.jigsaw.http.httpdProperties
java.lang.Object
|
+----java.util.Dictionary
|
+----java.util.Hashtable
|
+----java.util.Properties
|
+----w3c.jigsaw.http.httpdProperties
- public class httpdProperties
- extends Properties
Subclass of Properties, to deal with http specific usage of them.
This class refines the basic Properties class, in order to tune them for
http specific needs.
The major enhancement provided by this class over the basic Properties class
is to allow for property monitoring. The Jigsaw server doesn't define only
one set of properties. Instead - beacuse it is extensible - it define
multiple sets of properties. For example, the httpd
class
defines a set of global properties, the CommonLogger
class
also defines its own set of properties, etc.
Each property can be monitored, to allow for dynamic reconfiguration of
the server.
- See Also:
- PropertyMonitoring
-
httpdProperties(Properties)
- Build an httpdProperties instance from a Properties instance.
-
getBoolean(String, boolean)
- Get this property value, as a boolean.
-
getFile(String, File)
- Get this property value, as a File.
-
getInteger(String, int)
- Get this property value, as an integer.
-
getString(String, String)
- Get this property value, as a String.
-
putValue(String, String)
- Update a property value.
-
registerObserver(PropertyMonitoring)
- Subscribe for property monitoring.
-
unregisterObserver(PropertyMonitoring)
- Unsubscribe this object from the observers list.
httpdProperties
public httpdProperties(Properties props)
- Build an httpdProperties instance from a Properties instance.
- Parameters:
- props - The Properties instance.
registerObserver
public void registerObserver(PropertyMonitoring observer)
- Subscribe for property monitoring.
- Parameters:
- observer - The object that handles the PropertyMonitoring
interface.
unregisterObserver
public boolean unregisterObserver(PropertyMonitoring observer)
- Unsubscribe this object from the observers list.
- Parameters:
- observer - The observer to unsubscribe.
- Returns:
- A boolean true if object was succesfully
unsubscribed, false otherwise.
putValue
public synchronized boolean putValue(String name,
String value)
- Update a property value.
Assign a value to a property. If the property value has really changed
notify our observers of the change.
- Parameters:
- name - The name of the property to assign.
- value - The new value for this property, or null
if the property setting is to be cancelled.
- Returns:
- A boolean true if change was accepted by
our observers, false otherwise.
getBoolean
public boolean getBoolean(String name,
boolean def)
- Get this property value, as a boolean.
- Parameters:
- name - The name of the property to be fetched.
- def - The default value, if the property isn't defined.
- Returns:
- A Boolean instance.
getString
public String getString(String name,
String def)
- Get this property value, as a String.
- Parameters:
- name - The name of the property to be fetched.
- def - The default value, if the property isn't defined.
- Returns:
- An instance of String.
getInteger
public int getInteger(String name,
int def)
- Get this property value, as an integer.
- Parameters:
- name - The name of the property to be fetched.
- def - The default value, if the property isn't defined.
- Returns:
- An instance of Integer.
getFile
public File getFile(String name,
File def)
- Get this property value, as a File.
- Parameters:
- name - The name of the property to be fetched.
- def - The default value, if the property isn't defined.
- Returns:
- An instance of File.
All Packages Class Hierarchy This Package Previous Next Index