|
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.xmlrpcd.EventQueueProcessor
The EventQueueProcessor processes the events recieved by xmlrpcd and sends notifications to the external XMLRPC server via XMLRPC protocol.
Field Summary | |
private FifoQueue |
m_eventQ
The input queue |
private int |
m_maxQSize
The max size of the event queue |
private XmlRpcNotifier |
m_notifier
An object used to communicate with exteranl xmlrpc servers |
private int |
m_status
Current status of the fiber |
private java.lang.Thread |
m_worker
The thread that is executing the run method on behalf of
the 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 | |
(package private) |
EventQueueProcessor(FifoQueue eventQ,
XmlrpcServer[] rpcServers,
int retries,
int elapseTime,
boolean verifyServer,
java.lang.String localServer,
int maxQSize)
The constructor |
Method Summary | |
java.lang.String |
getName()
Returns the name of the fiber. |
int |
getStatus()
Returns the current status of the fiber |
void |
pause()
Pauses the current fiber. |
private void |
processEvent(Event event)
|
private void |
pushBackEvent(Event event)
Push the event back to the event queue if OpenNMS failed to send message to the external XMLRPC server, so that it could be send to the server again later. |
void |
resume()
Resumes the currently paused fiber. |
void |
run()
Reads off of the event queue and depends on the uei of the event of read, process the event to send a notification to the external XMLRPC server via XMLRPC protocol. |
void |
start()
Starts the current fiber. |
private boolean |
statusOK()
Returns true if the status is ok and the thread should continue running. |
void |
stop()
Stops this fiber. |
private void |
xmlrpcNotificationEventHandler(Event event)
Process xmlrpcNotificationEvent according the status flag to determine to send a notifyReceivedEvent, or a notifySuccess, or a notifyFailure notification to XMLRPC Server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private FifoQueue m_eventQ
private int m_maxQSize
private XmlRpcNotifier m_notifier
private int m_status
private java.lang.Thread m_worker
run
method on behalf of
the fiber.
Constructor Detail |
EventQueueProcessor(FifoQueue eventQ, XmlrpcServer[] rpcServers, int retries, int elapseTime, boolean verifyServer, java.lang.String localServer, int maxQSize)
Method Detail |
private void processEvent(Event event)
private void xmlrpcNotificationEventHandler(Event event)
private void pushBackEvent(Event event)
private boolean statusOK()
public void start()
start
in interface Fiber
java.lang.IllegalStateException
- Thrown if the fiber has already been started.public void pause()
pause
in interface PausableFiber
public void resume()
resume
in interface PausableFiber
public void stop()
Stops this fiber. If the fiber has never been started then an
IllegalStateExceptio
is generated.
stop
in interface Fiber
java.lang.IllegalStateException
- Thrown if the fiber has never been started.public java.lang.String getName()
getName
in interface Fiber
public int getStatus()
getStatus
in interface Fiber
public void run()
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 |