|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.vmmgr.DatabaseChecker
public class DatabaseChecker
This is the singleton class used to load the OpenNMS database configuration from the opennms-database.xml. This provides convenience methods to create database connections to the database configured in this default xml
Note: Users of this class should make sure the init() is called before calling any other method to ensure the config is loaded before accessing other convenience methods
| Constructor Summary | |
|---|---|
protected |
DatabaseChecker()
Load the config from the default config file and create the singleton instance of this factory. |
protected |
DatabaseChecker(String configFile)
Protected constructor |
| Method Summary | |
|---|---|
void |
check()
Check whether the data sources in opennms-datasources.xml are valid. |
static void |
main(String[] argv)
main |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DatabaseChecker(String configFile)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
ClassNotFoundException
configFile - a String object.
IOException - Thrown if the specified config file cannot be read
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
ClassNotFoundException - if any.
protected DatabaseChecker()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
ClassNotFoundException
IOException - Thrown if the specified config file cannot be read
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
ClassNotFoundException - if any.| Method Detail |
|---|
public void check()
throws MissingDataSourceException,
InvalidDataSourceException
Check whether the data sources in opennms-datasources.xml are valid.
MissingDataSourceException - A required data source was not found in opennms-datasources.xml.
InvalidDataSourceException - A required data source could not be connected to.
public static void main(String[] argv)
throws Exception
main
argv - an array of String objects.
Exception - if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||