Class w3c.jigsaw.daemon.DaemonProperties
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.daemon.DaemonProperties

java.lang.Object
   |
   +----java.util.Dictionary
           |
           +----java.util.Hashtable
                   |
                   +----java.util.Properties
                           |
                           +----w3c.util.ObservableProperties
                                   |
                                   +----w3c.jigsaw.daemon.DaemonProperties

public class DaemonProperties
extends ObservableProperties
Subclass of Properties, to deal with daemon specific usage of them. This class refines the basic Properties class, in order to tune them for ServerHandler specific needs:

Each property can be monitored, to allow for dynamic reconfiguration of the server.

See Also:
PropertyMonitoring

Constructor Index

 o DaemonProperties(Properties)
Build an httpdProperties instance from a Properties instance.

Method Index

 o getBoolean(ServerHandler, String, boolean)
Get this property value, as a boolean.
 o getDouble(ServerHandler, String, double)
Get this property as a double value.
 o getFile(ServerHandler, String, File)
Get this property value, as a File.
 o getInteger(ServerHandler, String, int)
Get this property value, as an integer.
 o getPropertyName(ServerHandler, String)
Build up the name of a property, specific to the given server handler.
 o getPropertyName(String, String)
 o getString(ServerHandler, String, String)
Get this property value, as a String.
 o getString(String, String, String)
 o getStringArray(ServerHandler, String, String[])
Get this property as a String array.
 o putValue(ServerHandler, String, String)
Update a property value.

Constructors

 o DaemonProperties
  public DaemonProperties(Properties props)
Build an httpdProperties instance from a Properties instance.
Parameters:
props - The Properties instance.

Methods

 o getPropertyName
  public String getPropertyName(ServerHandler handler,
                                String name)
Build up the name of a property, specific to the given server handler.
Parameters:
handler - The server handler which gives the context of the property.
Returns:
The full name of the property relevant to this server.
 o getPropertyName
  public String getPropertyName(String id,
                                String name)
 o putValue
  public synchronized boolean putValue(ServerHandler handler,
                                       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:
handler - The server handler for which you want the property.
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.
 o getBoolean
  public boolean getBoolean(ServerHandler handler,
                            String name,
                            boolean def)
Get this property value, as a boolean.
Parameters:
handler - The server handler for which you want the property.
name - The name of the property to be fetched.
def - The default value, if the property isn't defined.
Returns:
A Boolean instance.
 o getString
  public String getString(ServerHandler handler,
                          String name,
                          String def)
Get this property value, as a String.
Parameters:
handler - The server handler for which you want the property.
name - The name of the property to be fetched.
def - The default value, if the property isn't defined.
Returns:
An instance of String.
 o getString
  public String getString(String id,
                          String name,
                          String def)
 o getStringArray
  public String[] getStringArray(ServerHandler handler,
                                 String name,
                                 String def[])
Get this property as a String array. By convention, properties that are get as string arrays should be encoded as a | separated list of Strings.
Returns:
A String array, or null if the property is undefined.
 o getInteger
  public int getInteger(ServerHandler handler,
                        String name,
                        int def)
Get this property value, as an integer.
Parameters:
handler - The server handler for which you want the property.
name - The name of the property to be fetched.
def - The default value, if the property isn't defined.
Returns:
An instance of Integer.
 o getDouble
  public double getDouble(ServerHandler handler,
                          String name,
                          double def)
Get this property as a double value.
Parameters:
handler - The server handler for which you want the property.
name - The name of the property to be fetched.
def - The default value, if the property isn't defined.
Returns:
An instance of Integer.
 o getFile
  public File getFile(ServerHandler handler,
                      String name,
                      File def)
Get this property value, as a File.
Parameters:
handler - The server handler for which you want the property.
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