|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.opennms.bb.dp.common.components.PollerThread | +--org.opennms.bb.dp.actiond.Actiond
Actiond listens for events coming from eventd over JSDT. The XML stream is validated and parsed in order to extract any auto actions. These actions are added to a queue and processed by a pool of runnable consumer threads. Actions are executed as separate processes, monitored for termination (terminated forcefully if a timeout expires) and then results are logged to a file.
Field Summary | |
private PCQueue |
m_actionQ
the queue between the ActiondEventListener and the execManager |
private ActiondEventListener |
m_eventListener
The thread that listens to incoming threads |
private ActionLaunchManager |
m_launchManager
the thread that manages the pool of runnable consumer threads which launch the auto actions |
private static Properties |
m_properties
The properties that are specific to the Actiond process. |
Fields inherited from class org.opennms.bb.dp.common.components.PollerThread |
m_curOpStatus, STATUS_MASK, STATUS_NORMAL, STATUS_PAUSED, STATUS_PAUSING, STATUS_RESUMING, STATUS_SHUTDOWN, STATUS_STARTING, STATUS_TERMINATING |
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Constructor Summary | |
Actiond()
Actiond constructor creates the ActiondEventListener to listen for events.. |
Method Summary | |
(package private) static void |
Copy the System properties and then load the bluebird and Actiond specific files into the property object. |
static Properties |
getProperties()
|
static String |
getProperty(String key)
|
static void |
main(String[] args)
Start up Actiond |
void |
run()
Loop through and wait for status changes - if a status change is detected, all the threads are informed of the status change for appropriate action to be taken |
void |
shutdown()
Initiates the shutdown sequence and waits for this thread to exit. |
void |
start()
Start all the threads of Actiond |
Methods inherited from class org.opennms.bb.dp.common.components.PollerThread |
getCtrlStatus, getOpStatus, pauseOperation, pauseThread, resumeOperation, resumeThread, setCtrlStatus, setOpStatus, setUserStatus, shutdownThread |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, stop, stop, stop0, suspend, suspend0, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private ActiondEventListener m_eventListener
private ActionLaunchManager m_launchManager
private PCQueue m_actionQ
private static Properties m_properties
The properties that are specific to the Actiond 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 Actiond() throws ActiondEventListenerException, com.sun.media.jsdt.JSDTException
throws
- ActiondEventListenerException if the event listener communication channel cannot be set upthrows
- JSDTPropertiesException if the JSDT communication channel cannot be establishedMethod Detail |
static void()
Copy the System properties and then load the bluebird and Actiond 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 void start()
start
in class Thread
public void run()
run
in class Thread
public void shutdown()
Initiates the shutdown sequence and waits for this thread to exit.
shutdown
in class PollerThread
org.opennms.bb.dp.common.components.PollerThread
PollerThread.STATUS_TERMINATING
,
Object.notifyAll()
public static Properties getProperties()
public static String getProperty(String key)
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |