|
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.notifd.DefaultQueueHandler
This class is used as a thread for executing notices for events that are discovered by the notice daemon. The notices are read from an scheduler queue and the processes are created by the fiber. Each created process is added to garbage collection list that is periodically polled and culled based upon the status of the process or how long the process is run. If the process has run long than allocated it is terminated during collection.
Field Summary | |
private long |
m_interval
How long to sleep between processing more notices |
private NoticeQueue |
m_noticeQueue
The input queue of runnable commands. |
private java.lang.String |
m_queueID
The name of this Fiber |
private int |
m_status
The status of this fiber. |
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 | |
DefaultQueueHandler()
|
Method Summary | |
java.lang.String |
getName()
Returns the name of this fiber. |
int |
getStatus()
Returns the current status of the pausable fiber. |
void |
pause()
Pauses a currently running fiber. |
void |
processQueue()
|
void |
resume()
Resumes the fiber if it is paused. |
void |
run()
The main worker of the fiber. |
void |
setInterval(java.lang.String interval)
|
void |
setNoticeQueue(NoticeQueue noticeQueue)
|
void |
setQueueID(java.lang.String queueID)
|
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 NoticeQueue m_noticeQueue
private java.lang.String m_queueID
private long m_interval
private int m_status
Constructor Detail |
public DefaultQueueHandler()
Method Detail |
public void setQueueID(java.lang.String queueID)
setQueueID
in interface NotifdQueueHandler
public void setNoticeQueue(NoticeQueue noticeQueue)
setNoticeQueue
in interface NotifdQueueHandler
public void setInterval(java.lang.String interval)
setInterval
in interface NotifdQueueHandler
public void run()
STOP_PENDING
then the method will return as quickly as
possible.
run
in interface java.lang.Runnable
public void processQueue()
processQueue
in interface NotifdQueueHandler
public void start()
STARTING
and will transisition 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 |