|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.eventd.EventConfigurationManager
This is the singleton class used to manage the event configuration. When the class is loaded an attempt is made to read and load the file named eventconf.xml. The file must be in the applications searched classpaths in order to be loaded when the class is loaded.
Once the class is constructed it is possible to reconfigure or merge additional events into the configuration by using the methods provided by the class.
Field Summary | |
private static EventConfData |
m_eventConf
The mapping of all the Event Configuration objects |
private static boolean |
m_loaded
This member is set to true if the configuration file has been loaded. |
private static java.lang.String[] |
m_secureTags
The list of secure tags. |
Constructor Summary | |
EventConfigurationManager()
|
Method Summary | |
static Event |
get(Event event)
Returns the matching event configuration instance for the event that just came in. |
static Event |
getBySnmpEid(java.lang.String eid)
Returns the matching event configuration instance that is indexed by the SNMP enterprise identifier. |
static Event |
getByUei(java.lang.String uei)
Returns the matching event configuration instance that is indexed by the passed UEI. |
static boolean |
isConfigured()
Returns true if the configuration has been loaded. |
static boolean |
isSecureTag(java.lang.String name)
Returns true if the tag is marked as secure. |
static void |
loadConfiguration(java.io.Reader rdr)
This method is used to load the passed configuration into the currently managed configuration instance. |
static void |
loadConfiguration(java.lang.String file)
This method is used to load the passed configuration into the currently managed configuration instance. |
static void |
mergeConfiguration(java.io.Reader rdr)
This method is used to load the passed configuration into the currently managed configuration instance. |
static void |
mergeConfiguration(java.lang.String file)
This method is used to load the passed configuration into the currently managed configuration instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static EventConfData m_eventConf
private static volatile boolean m_loaded
private static volatile java.lang.String[] m_secureTags
Constructor Detail |
public EventConfigurationManager()
Method Detail |
public static boolean isConfigured()
public static void loadConfiguration(java.lang.String file) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
file
- The file to load.
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.
java.lang.IOException
- Thrown if the file cannot be opened for reading.
java.io.IOException
public static void loadConfiguration(java.io.Reader rdr) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
rdr
- The reader used to load the configuration.
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.
java.io.IOException
public static void mergeConfiguration(java.lang.String file) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
file
- The configuration file name.
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.
java.lang.IOException
- Thrown if the file cannot be opened for reading.
java.io.IOException
public static void mergeConfiguration(java.io.Reader rdr) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
rdr
- The reader used to load the configuration.
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.public static Event getByUei(java.lang.String uei)
Event
that was
loaded from the event configuration file.
public static Event getBySnmpEid(java.lang.String eid)
Event
that was loaded from the event configuration file.
public static Event get(Event event)
Event
that was loaded
from the event configuration file.
public static boolean isSecureTag(java.lang.String name)
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |