All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.daemon.DaemonProperties

java.lang.Object
   |
   +----w3c.jigsaw.daemon.DaemonProperties

public class DaemonProperties
extends Object
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

Variable Index

 o configdir
Our base config directory.
 o globprops
The global set of properties (inherited by all spaces).
 o propspace
The set of loaded properties set.

Constructor Index

 o DaemonProperties(File, Properties)

Method Index

 o getProperty(String)
 o getPropertySpace(String)
Get the properties for the given space.
 o getString(String, String)
 o load(InputStream)
 o loadPropertySpace(String)
Load in the default properties for the given space.
 o loadPropertySpace(String, InputStream)
Extend a property space.
 o save()
 o savePropertySpace(String)

Variables

 o propspace
 protected Hashtable propspace
The set of loaded properties set.

 o globprops
 protected Properties globprops
The global set of properties (inherited by all spaces).

 o configdir
 protected File configdir
Our base config directory.

Constructors

 o DaemonProperties
 public DaemonProperties(File configdir,
                         Properties props)
Parameters:
props - The global properties to use in all spaces.

Methods

 o loadPropertySpace
 public ObservableProperties loadPropertySpace(String id,
                                               InputStream in) throws IOException
Extend a property space.

Parameters:
id - The identifier of the property set to extend.
in - The input stream containing Java properties to add.
Throws: IOException
If the input stream couldn't be read.
 o loadPropertySpace
 public ObservableProperties loadPropertySpace(String id) throws IOException, FileNotFoundException
Load in the default properties for the given space. The file from which properties are loaded is kept itself as the w3c.jigsaw.propfile property.

Parameters:
id - The identifier of the property set to load.
Throws: FileNotFoundException
If the default property file wasn't found.
Throws: IOException
If default property file couldn't be read.
 o getPropertySpace
 public ObservableProperties getPropertySpace(String id)
Get the properties for the given space.

Parameters:
id - The identifier for a property set space.
Returns:
An ObservableProperties instance, or null.
 o save
 public void save()
 o savePropertySpace
 public void savePropertySpace(String id)
 o load
 public void load(InputStream in) throws IOException
 o getProperty
 public String getProperty(String name)
 o getString
 public String getString(String name,
                         String def)

All Packages  Class Hierarchy  This Package  Previous  Next  Index