|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--irssibot.config.ConfigParser
Confiduration file parser.
| Field Summary | |
private java.util.ArrayList |
databases
List of database descriptors |
private java.lang.String |
dateFormatString
Logging date format string |
private java.util.Vector |
initialModules
List of modules to load at bot startup |
private CommonLog |
log
Logger |
private java.lang.String |
moduleBaseDir
Module base dir |
private java.util.Vector |
serverInstances
List of server instances |
| Constructor Summary | |
ConfigParser(java.lang.String configFileName)
Constructs. |
|
| Method Summary | |
java.util.ArrayList |
getDatabases()
Returns database descriptors. |
java.lang.String |
getDateFormatString()
Returns date format string. |
java.util.Vector |
getInitialModules()
Return initial modules list. |
java.util.Vector |
getInstanceData()
Returns server instance descriptors. |
CommonLog |
getLog()
Returns logger. |
java.lang.String |
getModuleBaseDir()
Returns the module base dir. |
private void |
handleDatabaseNode(org.w3c.dom.Node node)
Reads database information. |
private void |
handleGeneralNode(org.w3c.dom.Node node)
Parse general information. |
private void |
handleServerInstanceNode(org.w3c.dom.Node node)
Create and init a new server instance. |
private void |
parse(org.w3c.dom.Node node)
Parses the DOM document representing the config file. |
private org.w3c.dom.Node |
readConfigFile(java.lang.String configFileName)
Reads config file and generates a DOM document out of it. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private CommonLog log
private java.lang.String dateFormatString
private java.util.Vector initialModules
private java.util.Vector serverInstances
private java.util.ArrayList databases
private java.lang.String moduleBaseDir
| Constructor Detail |
public ConfigParser(java.lang.String configFileName)
throws java.io.IOException
configFileName - config file name
java.io.IOException - if reading the config file fails| Method Detail |
private org.w3c.dom.Node readConfigFile(java.lang.String configFileName)
throws java.io.IOException
configFileName - config file name
java.io.IOException - if reading the config file failsprivate void handleDatabaseNode(org.w3c.dom.Node node)
node - database nodeprivate void handleGeneralNode(org.w3c.dom.Node node)
node - server-instance nodeprivate void handleServerInstanceNode(org.w3c.dom.Node node)
node - server-instance nodeprivate void parse(org.w3c.dom.Node node)
node - document root nodepublic java.util.ArrayList getDatabases()
public java.util.Vector getInitialModules()
public java.util.Vector getInstanceData()
public CommonLog getLog()
public java.lang.String getDateFormatString()
public java.lang.String getModuleBaseDir()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||