|
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.discovery.SuspectEventGenerator
This class represents a suspect event generator that takes instances of ping replies and converts them to events. The events are then sent to the event daemon.
Field Summary | |
(package private) static java.lang.String |
EVENT_SOURCE_VALUE
The value used as the source of the event. |
private java.lang.String |
m_name
The name of the fiber. |
private FifoQueue |
m_replies
The queue where ping replies are recovered. |
private int |
m_status
The status of the fiber. |
private long |
m_ttl
The time to live to set on events sent out |
private java.lang.Thread |
m_worker
The worker thread that reads replies and sends events. |
Fields inherited from interface org.opennms.core.fiber.Fiber |
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED |
Constructor Summary | |
(package private) |
SuspectEventGenerator(FifoQueue replyQ,
long ttl)
Construts a new instance of the class that is used to send new suspect events. |
Method Summary | |
java.lang.String |
getName()
Returns the name of this fiber. |
int |
getStatus()
Returns the current status of the fiber. |
void |
run()
This method is used to do the main work for the fiber. |
void |
start()
Starts the fiber. |
void |
stop()
Stops the fiber if it is running. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final java.lang.String EVENT_SOURCE_VALUE
private FifoQueue m_replies
private long m_ttl
private int m_status
private java.lang.String m_name
private java.lang.Thread m_worker
Constructor Detail |
SuspectEventGenerator(FifoQueue replyQ, long ttl)
ping replies
found by
the discovery process. The replies are turned into suspect node events
and sent to eventd
Method Detail |
public void start()
Starts the fiber. The fiber is transitioned from
START_PENDING
to STARTING
and once the
fiber startup is complete the status is changed to RUNNING
.
If the fiber has already been started then an exception is generated.
start
in interface Fiber
java.lang.IllegalStateException
- Thrown if the fiber has already been started.public void stop()
stop
in interface Fiber
java.lang.IllegalStateException
- Thrown if the fiber was never started.public int getStatus()
getStatus
in interface Fiber
public java.lang.String getName()
getName
in interface Fiber
public void run()
This method is used to do the main work for the fiber. This method is invoked once and will not return until the fiber is stopped, or a non-recovereable error occurs.
After starting the status is changed to RUNNING
and a loop
starts. The loop extracts the instances of
Reply
objects and then generates
XML based event messages that are sent to eventd
run
in interface java.lang.Runnable
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |