|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.notifd.DefaultQueueHandler
public class 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 |
|---|
| 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 | |
|---|---|
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(String interval)
|
void |
setNoticeQueue(NoticeQueue noticeQueue)
|
void |
setQueueID(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 |
| Constructor Detail |
|---|
public DefaultQueueHandler()
| Method Detail |
|---|
public void setQueueID(String queueID)
setQueueID in interface NotifdQueueHandlerpublic void setNoticeQueue(NoticeQueue noticeQueue)
setNoticeQueue in interface NotifdQueueHandlerpublic void setInterval(String interval)
setInterval in interface NotifdQueueHandlerpublic void run()
STOP_PENDING then the method will return as quickly as
possible.
run in interface Runnablepublic void processQueue()
processQueue in interface NotifdQueueHandlerpublic void start()
STARTING and will transisition to
RUNNING
when the fiber finishes initializing and begins processing the
encapsulaed queue.
start in interface FiberIllegalStateException - Thrown if the fiber is stopped or has never run.public void stop()
stop in interface FiberIllegalStateException - Thrown if the fiber was never started.public void pause()
pause in interface PausableFiberIllegalStateException - Thrown if the fiber is stopped or has never run.public void resume()
resume in interface PausableFiberIllegalStateException - Thrown if the fiber is stopped or has never run.public String getName()
getName in interface Fiberpublic int getStatus()
getStatus in interface FiberPausableFiber,
Fiber
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||