|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.relacs.config.ConfigParser
public final class ConfigParser
Parser code to read an XML configuration file, using the supplied URL.
Constructor Summary | |
---|---|
ConfigParser()
|
Method Summary | |
---|---|
static boolean |
getBooleanAttrib(org.w3c.dom.Element elm,
java.lang.String attrib,
boolean required)
|
static java.lang.Object |
getConfig(java.lang.Class cl)
Retrieve an instance of the given configuration class, that is containing the configuration information. |
static void |
parse(java.lang.String urlConfig)
The same as parse(urlConfig, false) . |
static void |
parse(java.lang.String urlConfig,
boolean parseAgain)
Parses the file obtained from the specified URL and inserts in an internal map, associations from class literals of configuration objects to configuration object instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigParser()
Method Detail |
---|
public static void parse(java.lang.String urlConfig) throws ConfigurationException
parse(urlConfig, false)
.
ConfigurationException
public static void parse(java.lang.String urlConfig, boolean parseAgain) throws ConfigurationException
urlConfig
- the URL to the XML configuration file containing
the description of the distributed system.parseAgain
- If false, all config-files will be parsed only once.
ConfigurationException
public static java.lang.Object getConfig(java.lang.Class cl)
Transport
, can be retreived using the class literal
TransportConfig.class
.
cl
- The class literal of the configuration object to retreive.
java.lang.NullPointerException
- If there is no such configuration object in the internal
configuration map. This may occur for two reasons; (i) there
is no such configuration tag specified in the configuration file,
or (ii) the specified class literal is a non-existant class.
java.lang.IllegalStateException
- If the parser was not invoked prior to invoking this method.public static boolean getBooleanAttrib(org.w3c.dom.Element elm, java.lang.String attrib, boolean required) throws ConfigurationException
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |