OpenNMS API 1.2.3

org.opennms.netmgt.vulnscand
Class BroadcastEventProcessor

java.lang.Object
  extended byorg.opennms.netmgt.vulnscand.BroadcastEventProcessor
All Implemented Interfaces:
EventListener

final class BroadcastEventProcessor
extends java.lang.Object
implements EventListener

Author:
Seth Leger , Brian Weaver , OpenNMS

Field Summary
private  Scheduler m_scheduler
          The Vulnscand rescan scheduler
private  FifoQueue m_suspectQ
          The location where suspectInterface events are enqueued for processing.
private static java.lang.String SQL_RETRIEVE_NODEID
          SQL query to retrieve nodeid of a particulary interface address
 
Constructor Summary
(package private) BroadcastEventProcessor(FifoQueue suspectQ, Scheduler scheduler)
          This constructor is called to initilize the JMS event receiver.
 
Method Summary
(package private)  void close()
           Closes the current connections to the Java Message Queue if they are still active.
protected  void finalize()
          This method may be invoked by the garbage collection.
 java.lang.String getName()
          Return the id of the listener
private  void installJmsMessageSelector()
          Create message selector to set to the subscription
 void onEvent(Event event)
          This method is invoked by the JMS topic session when a new event is available for processing.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQL_RETRIEVE_NODEID

private static java.lang.String SQL_RETRIEVE_NODEID
SQL query to retrieve nodeid of a particulary interface address


m_suspectQ

private FifoQueue m_suspectQ
The location where suspectInterface events are enqueued for processing.


m_scheduler

private Scheduler m_scheduler
The Vulnscand rescan scheduler

Constructor Detail

BroadcastEventProcessor

BroadcastEventProcessor(FifoQueue suspectQ,
                        Scheduler scheduler)
This constructor is called to initilize the JMS event receiver. A connection to the message server is opened and this instance is setup as the endpoint for broadcast events. When a new event arrives it is processed and the appropriate action is taken.

Parameters:
suspectQ - The queue where new Runnable objects are enqueued for running..
scheduler - Rescan scheduler.
Method Detail

installJmsMessageSelector

private void installJmsMessageSelector()
Create message selector to set to the subscription


close

void close()

Closes the current connections to the Java Message Queue if they are still active. This call may be invoked more than once safely and may be invoked during object finalization.


finalize

protected void finalize()
                 throws java.lang.Throwable
This method may be invoked by the garbage collection. Once invoked it ensures that the close method is called at least once during the cycle of this object.

Throws:
java.lang.Throwable

onEvent

public void onEvent(Event event)
This method is invoked by the JMS topic session when a new event is available for processing. Currently only text based messages are processed by this callback. Each message is examined for its Universal Event Identifier and the appropriate action is taking based on each UEI.

Specified by:
onEvent in interface EventListener
Parameters:
event - The event message.

getName

public java.lang.String getName()
Description copied from interface: EventListener
Return the id of the listener

Specified by:
getName in interface EventListener

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.