## org.w3c.jigsaw.daemon
Class DaemonProperties

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

public class DaemonProperties
extends java.lang.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:

- Properties can be observed through the PropertyMonitoring interface,
- Properties are multiplexed according 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 org.w3c.jigsaw.http package host property can be set fro server1 to host1 and for server2 to host2. This is done by defining server1.org.w3c.jigsaw.http.host and server2.org.w3c.jigsaw.http.host

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

See Also:
  `PropertyMonitoring`

Field Summary
`protected java.io.File` | `configdir` Our base config directory.
`protected java.util.Properties` | `globprops` The global set of properties (inherited by all spaces).
`protected java.util.Hashtable` | `propspace` The set of loaded properties set.

Constructor Summary
`DaemonProperties(java.io.File configdir, java.util.Properties props)`

Method Summary
`java.lang.String` | `getProperty(java.lang.String name)`
`ObservableProperties` | `getPropertySpace(java.lang.String id)` Get the properties for the given space.
`java.lang.String` | `getString(java.lang.String name, java.lang.String def)`
`void` | `load(java.io.InputStream in)`
`ObservableProperties` | `loadPropertySpace(java.lang.String id)` Load in the default properties for the given space.
`ObservableProperties` | `loadPropertySpace(java.lang.String id, java.io.InputStream in)` Extend a property space.
`void` | `save()`
`void` | `savePropertySpace(java.lang.String id)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### propspace

    protected java.util.Hashtable propspace

  The set of loaded properties set.

### globprops

    protected java.util.Properties globprops

  The global set of properties (inherited by all spaces).

### configdir

    protected java.io.File configdir

  Our base config directory.

Constructor Detail

### DaemonProperties

    public DaemonProperties(java.io.File configdir,
                            java.util.Properties props)

  Parameters:
    `props` - The global properties to use in all spaces.

Method Detail

### loadPropertySpace

    public ObservableProperties loadPropertySpace(java.lang.String id,
                                                  java.io.InputStream in)
                                           throws java.io.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:
    java.io.IOException - If the input stream couldn't be read.

### loadPropertySpace

    public ObservableProperties loadPropertySpace(java.lang.String id)
                                           throws java.io.IOException,
                                                  java.io.FileNotFoundException

  Load in the default properties for the given space. The file from which properties are loaded is kept itself as the `org.w3c.jigsaw.propfile` property.
  Parameters:
    `id` - The identifier of the property set to load.
  Throws:
    java.io.FileNotFoundException - If the default property file wasn't found.
    java.io.IOException - If default property file couldn't be read.

### getPropertySpace

    public ObservableProperties getPropertySpace(java.lang.String id)

  Get the properties for the given space.
  Parameters:
    `id` - The identifier for a property set space.
  Returns:
    An ObservableProperties instance, or null.

### save

    public void save()

### savePropertySpace

    public void savePropertySpace(java.lang.String id)

### load

    public void load(java.io.InputStream in)
              throws java.io.IOException

### getProperty

    public java.lang.String getProperty(java.lang.String name)

### getString

    public java.lang.String getString(java.lang.String name,
                                      java.lang.String def)