|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.util.Registry
The Registry is a configuration tree based on a key, value pair structure, essentially like an AList.
Constructor Summary | |
Registry()
|
Method Summary | |
static void |
addListener(ChangeListener listener)
|
RegistryNode |
createNode(java.lang.String name,
java.lang.String value)
Create a new RegistryNode. |
static boolean |
getBoolean(java.lang.String path,
boolean deflt)
|
static int |
getChangeCount()
|
static QDate |
getDate(java.lang.String path,
QDate deflt)
|
java.util.ArrayList |
getDependList()
Returns the dependency list. |
static double |
getDouble(java.lang.String path,
double deflt)
|
static int |
getInt(java.lang.String path,
int deflt)
|
static java.lang.String |
getPath(java.lang.String path,
java.lang.String deflt)
Returns a configuration value, interpreted as a file path. |
static long |
getPeriod(java.lang.String path,
long deflt)
|
static Registry |
getRegistry()
Returns the default registry. |
static java.lang.String |
getString(java.lang.String path,
java.lang.String deflt)
|
RegistryNode |
getTop()
Returns the top node. |
boolean |
isModified()
Returns true if any of the source configuration files have changed. |
static RegistryNode |
lookup(java.lang.String path)
Looks up a registry node based on the path. |
static Registry |
parse(Path path)
Parses a registry tree from a file. |
static Registry |
parse(ReadStream is)
Parses a registry tree from a file. |
static void |
removeListener(ChangeListener listener)
|
static Registry |
setDefault(Registry registry)
Sets the default configuration |
static Registry |
setRegistry(Registry registry)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Registry()
Method Detail |
public RegistryNode createNode(java.lang.String name, java.lang.String value)
name
- name of the nodevalue
- value of the nodepublic boolean isModified()
public java.util.ArrayList getDependList()
public RegistryNode getTop()
public static Registry parse(Path path) throws java.io.IOException, org.xml.sax.SAXException
path
- the file containing the configuration.public static Registry parse(ReadStream is) throws java.io.IOException, org.xml.sax.SAXException
is
- a stream containing the configuration.public static Registry setDefault(Registry registry)
registry
- configuration to be used as the new defaultpublic static Registry setRegistry(Registry registry)
public static Registry getRegistry()
public static RegistryNode lookup(java.lang.String path)
path
- relative path into the registry.public static boolean getBoolean(java.lang.String path, boolean deflt) throws RegistryException
public static int getInt(java.lang.String path, int deflt) throws RegistryException
public static double getDouble(java.lang.String path, double deflt) throws RegistryException
public static java.lang.String getString(java.lang.String path, java.lang.String deflt)
public static java.lang.String getPath(java.lang.String path, java.lang.String deflt)
path
- the registry pathdeflt
- default value if the configuration isn't specified.public static QDate getDate(java.lang.String path, QDate deflt) throws RegistryException
public static long getPeriod(java.lang.String path, long deflt) throws RegistryException
public static void addListener(ChangeListener listener)
public static int getChangeCount()
public static void removeListener(ChangeListener listener)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |