|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.eventd.Eventd
Eventd listens for events from the discovery, capsd, trapd processes and sends events to the Master Station when queried for.
Eventd receives events sent in as XML, looks up the event.conf and adds information to these events and stores them to the db. It also reconverts them back to XML to be sent to other processes like 'actiond'
Process like trapd, capsd etc. that are local to the distributed poller use JSDT to send events to the eventd. Events can also be sent via TCP or UDP to eventd
Eventd has the following components - EventListener, EventExpandManager, and EventPersistd to listen for incoming events, load info from the 'event.conf' and to add the expanded events to the database respectively. The events added to the database are then sent out via JSDT
Inner Class Summary | |
private static class |
Eventd.EventdClient
The JSDT client. |
Field Summary | |
private PCQueue |
m_bridgeQ
The queue of EventReaders from the TCP/UDP/JSDT receivers. |
private static com.sun.media.jsdt.Client |
m_client
The JSDT client that is registered for the session and channels. |
private static Map |
m_eventConf
The list of base events from the event configuration file. |
private EventListener |
m_listener
The thread that listens to incoming threads |
private static List |
m_overrides
The list of elements in each event that cannot be overridden by the input source. |
private EventPersistd |
m_persistd
the thread that is responsible for writing event data to the db |
private static Properties |
m_properties
The properties that are specific to the eventd process. |
private static com.sun.media.jsdt.Session |
m_session
The jsdt session that all tranactions should occur on. |
Constructor Summary | |
Eventd()
Eventd constructor creates the eventlistener to listen for events.. |
Method Summary | |
(package private) static void |
Copy the System properties and then load the bluebird and eventd specific files into the property object. |
static void |
closeSession()
Closes the global JSDT communication session for the event daemon. |
static com.sun.media.jsdt.Client |
getClient()
Returns the JSDT Client for the event system. |
static EventBase |
getEventByName(String key)
Find the mapped event base object for the passed key. |
static List |
getOverrides()
Returns list of strings that must be reset in the parser. |
static Properties |
getProperties()
|
static String |
getProperty(String key)
|
static com.sun.media.jsdt.Session |
getSession()
Returns the global Event daemon session to the requestor. |
static void |
initSession()
Opens up hte current JSDT session for the event daemon. |
static void |
loadConfiguration()
|
static void |
main(String[] args)
Start up Eventd |
void |
shutdown()
Initiates the shutdown sequence and waits for this thread to exit. |
void |
start()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
private EventListener m_listener
private EventPersistd m_persistd
private PCQueue m_bridgeQ
private static com.sun.media.jsdt.Session m_session
private static com.sun.media.jsdt.Client m_client
private static List m_overrides
private static Map m_eventConf
private static Properties m_properties
The properties that are specific to the eventd process. The properties are a combination of the JVM's system properties, plus the inclusion of the OpenNMS specific property files. There are two additional files that are loaded, if the system properties are correctly set.
In order to properly load the OpenNMS specific file(s) their location must be known in advance. Instead of hard coding the location of the files, the files are referenced by properties. The following list declares the properites that reference the specific files. The property files are loaded in the order they appear in the list.
Currently the string returned for the propertyFile(s) must be a file on the local filesystem. Later support for remote files via HTTP, JSDT, etc al may be supported.
Constructor Detail |
public Eventd() throws com.sun.media.jsdt.JSDTException, SQLException, EventListenerException
EventListenerException
- if the event
listener communication channels cannot be set upjava.lang.NullPointerException
- Thrown if the properties eventd
is looking for cannot be readcom.sun.media.JSDTPropertiesException
- Thrown if the JSDT
communication channel cannot be establishedMethod Detail |
static void()
Copy the System properties and then load the bluebird and eventd specific files into the property object. For more information see the javadoc comment for the m_properties element.
Additionally, this static loading will also look at the debugging options and will setup the Logging Facility. This can only be done after the properties have been loaded.
public static void loadConfiguration() throws IOException, org.xml.sax.SAXException
java.lang.NullPointerException
- Thrown if a required property cannot be found.public static void initSession() throws com.sun.media.jsdt.JSDTException
com.sun.media.jsdt.JSDTException
- Thrown if an error occurs
openning the session.IllegalStateException
- Thrown if the session was
already open for the eventd system.public static void closeSession() throws com.sun.media.jsdt.JSDTException
com.sun.media.jsdt.JSDTException
- Thrown if an error
occurs shutting down the session.IllegalStateException
- Thrown if the session
was not open.public static com.sun.media.jsdt.Session getSession()
IllegalStateException
- Thrown if the
session has not yet been initalized.public static com.sun.media.jsdt.Client getClient()
public void shutdown()
Initiates the shutdown sequence and waits for this thread to exit.
public void start()
public static Properties getProperties()
public static String getProperty(String key)
public static List getOverrides()
public static EventBase getEventByName(String key)
Find the mapped event base object for the passed key. When the event configuration is loaded the event base objects are indexed using their UEI and if available, the SNMP Enterprise identifier.
key
- The key for the required event base object.public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |