|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.jigsaw.daemon.DaemonProperties
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.
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 |
protected java.util.Hashtable propspace
protected java.util.Properties globprops
protected java.io.File configdir
Constructor Detail |
public DaemonProperties(java.io.File configdir, java.util.Properties props)
props
- The global properties to use in all spaces.Method Detail |
public ObservableProperties loadPropertySpace(java.lang.String id, java.io.InputStream in) throws java.io.IOException
id
- The identifier of the property set to extend.in
- The input stream containing Java properties to add.
java.io.IOException
- If the input stream couldn't be read.public ObservableProperties loadPropertySpace(java.lang.String id) throws java.io.IOException, java.io.FileNotFoundException
org.w3c.jigsaw.propfile
property.
id
- The identifier of the property set to load.
java.io.FileNotFoundException
- If the default property file wasn't
found.
java.io.IOException
- If default property file couldn't be read.public ObservableProperties getPropertySpace(java.lang.String id)
id
- The identifier for a property set space.
public void save()
public void savePropertySpace(java.lang.String id)
public void load(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public java.lang.String getProperty(java.lang.String name)
public java.lang.String getString(java.lang.String name, java.lang.String def)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |