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:
- Properties can be observed through the PropertyMonitoring interface,
- Properties are multiplexed accordiong to the server identifier. Two
servers can rely on the same set of properties, but each of them can
have its own property value. Eg the w3c.jigsaw.http package host property
can be set fro server1 to host1 and for server2 to host2. This is done
by defining server1.w3c.jigsaw.http.host and server2.w3c.jigsaw.http.host
Each property can be monitored, to allow for dynamic reconfiguration of
the server.
- See Also:
- PropertyMonitoring
-
DaemonProperties(Properties)
- Build an httpdProperties instance from a Properties instance.
-
getBoolean(ServerHandler, String, boolean)
- Get this property value, as a boolean.
-
getDouble(ServerHandler, String, double)
- Get this property as a double value.
-
getFile(ServerHandler, String, File)
- Get this property value, as a File.
-
getInteger(ServerHandler, String, int)
- Get this property value, as an integer.
-
getPropertyName(ServerHandler, String)
- Build up the name of a property, specific to the given server handler.
-
getPropertyName(String, String)
-
-
getString(ServerHandler, String, String)
- Get this property value, as a String.
-
getString(String, String, String)
-
-
getStringArray(ServerHandler, String, String[])
- Get this property as a String array.
-
putValue(ServerHandler, String, String)
- Update a property value.
DaemonProperties
public DaemonProperties(Properties props)
- Build an httpdProperties instance from a Properties instance.
- Parameters:
- props - The Properties instance.
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.
getPropertyName
public String getPropertyName(String id,
String name)
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.
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.
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.
getString
public String getString(String id,
String name,
String def)
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.
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.
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.
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