|
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.scriptd.Executor
This class is used as a thread for launching scripts to handle received events.
Field Summary | |
private ScriptdConfigFactory |
m_config
The configuration. |
private java.util.Hashtable |
m_eventScriptMap
The configured scripts (UEI specified). |
private java.util.ArrayList |
m_eventScripts
The configured scripts (no UEI specified). |
private FifoQueue |
m_execQ
The input queue of events. |
private com.ibm.bsf.BSFManager |
m_mgr
The BSF manager |
private java.lang.String |
m_name
The name of this Fiber |
private int |
m_status
The status of this fiber. |
private java.lang.Thread |
m_worker
The worker thread that executes the run method. |
Fields inherited from interface org.opennms.core.fiber.PausableFiber |
PAUSE_PENDING, PAUSED, RESUME_PENDING |
Fields inherited from interface org.opennms.core.fiber.Fiber |
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED |
Constructor Summary | |
(package private) |
Executor(FifoQueue execQ,
ScriptdConfigFactory config)
Constructs a new action daemon execution environment. |
Method Summary | |
java.lang.String |
getName()
Returns the name of this fiber. |
int |
getStatus()
Returns the current status of the pausable fiber. |
private void |
loadConfig()
Load the m_scripts and m_scriptMap data structures from the configuration. |
void |
pause()
Pauses a currently running fiber. |
void |
resume()
Resumes the fiber if it is paused. |
void |
run()
The main worker of the fiber. |
void |
start()
Starts the fiber. |
void |
stop()
Stops a currently running fiber. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private FifoQueue m_execQ
private java.lang.Thread m_worker
run
method.
private java.lang.String m_name
private int m_status
private ScriptdConfigFactory m_config
private java.util.ArrayList m_eventScripts
private java.util.Hashtable m_eventScriptMap
private com.ibm.bsf.BSFManager m_mgr
Constructor Detail |
Executor(FifoQueue execQ, ScriptdConfigFactory config)
execQ
- The execution queueconfig
- The Scriptd configuration.Method Detail |
private void loadConfig()
public void run()
STOP_PENDING
then the method will return as quickly as
possible.
run
in interface java.lang.Runnable
public void start()
STARTING
and will transition to
RUNNING
when the fiber finishes initializing and begins processing the
encapsulaed queue.
start
in interface Fiber
java.lang.IllegalStateException
- Thrown if the fiber is stopped or has never run.public void stop()
stop
in interface Fiber
java.lang.IllegalStateException
- Thrown if the fiber was never started.public void pause()
pause
in interface PausableFiber
java.lang.IllegalStateException
- Thrown if the fiber is stopped or has never run.public void resume()
resume
in interface PausableFiber
java.lang.IllegalStateException
- Thrown if the fiber is stopped or has never run.public java.lang.String getName()
getName
in interface Fiber
public int getStatus()
getStatus
in interface Fiber
PausableFiber
,
Fiber
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |