|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.config.VacuumdConfigFactory
public final class VacuumdConfigFactory
This is the singleton class used to load the configuration for the OpenNMS Vacuumd process from the vacuumd-configuration xml file. Note: Users of this class should make sure the setReader() method is called before calling any other method to ensure the config is loaded before accessing other convenience methods.
| Constructor Summary | |
|---|---|
VacuumdConfigFactory(InputStream stream)
Constructor for VacuumdConfigFactory. |
|
VacuumdConfigFactory(Reader rdr)
Deprecated. |
|
| Method Summary | |
|---|---|
Action |
getAction(String actionName)
Returns an Action with a name matching the string parmater |
ActionEvent |
getActionEvent(String name)
getActionEvent |
Collection<ActionEvent> |
getActionEvents()
getActionEvents |
Collection<Action> |
getActions()
Returns a Collection of actions defined in the config |
AutoEvent |
getAutoEvent(String name)
Deprecated. Use ActionEvent objects instead. Access these objects with getActionEvent(String). |
Collection<AutoEvent> |
getAutoEvents()
Deprecated. Use ActionEvent objects instead. Access these objects with getActionEvents(). |
Automation |
getAutomation(String autoName)
Returns an Automation with a name matching the string parameter |
Collection<Automation> |
getAutomations()
Returns a Collection of automations defined in the config |
static VacuumdConfigFactory |
getInstance()
Return the singleton instance of this factory. |
int |
getPeriod()
getPeriod |
String[] |
getSqlStatements()
getSqlStatements |
List<Statement> |
getStatements()
getStatements |
Trigger |
getTrigger(String triggerName)
Returns a Trigger with a name matching the string parameter |
Collection<Trigger> |
getTriggers()
Returns a Collection of triggers defined in the config |
static void |
init()
Load the config from the default config file and create the singleton instance of this factory. |
static void |
reload()
Reload the config from the default config file |
static void |
setInstance(VacuumdConfigFactory instance)
Set the singleton instance of this factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated
public VacuumdConfigFactory(Reader rdr)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
Constructor for VacuumdConfigFactory.
rdr - Reader
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
public VacuumdConfigFactory(InputStream stream)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
Constructor for VacuumdConfigFactory.
stream - a InputStream object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.| Method Detail |
|---|
public static void init()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
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.
public static void reload()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - Thrown if the specified config file cannot be read/loaded
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.public static VacuumdConfigFactory getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static void setInstance(VacuumdConfigFactory instance)
instance - The factory instance to set.public Collection<Automation> getAutomations()
Collection object.public Collection<Trigger> getTriggers()
Collection object.public Collection<Action> getActions()
Collection object.public Collection<AutoEvent> getAutoEvents()
ActionEvent objects instead. Access these objects with getActionEvents().
Collection object.public Collection<ActionEvent> getActionEvents()
getActionEvents
Collection object.public int getPeriod()
getPeriod
public Trigger getTrigger(String triggerName)
triggerName - a String object.
Trigger object.public Action getAction(String actionName)
actionName - a String object.
Action object.public Automation getAutomation(String autoName)
autoName - a String object.
Automation object.public AutoEvent getAutoEvent(String name)
ActionEvent objects instead. Access these objects with getActionEvent(String).
name - a String object.
AutoEvent object.public String[] getSqlStatements()
getSqlStatements
String objects.public List<Statement> getStatements()
getStatements
List object.public ActionEvent getActionEvent(String name)
getActionEvent
name - a String object.
ActionEvent object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||