org.opennms.bb.dp.actiond.components
Class ActiondEventsReader

java.lang.Object
  |
  +--org.opennms.bb.dp.actiond.components.ActiondEventsReader
All Implemented Interfaces:
Runnable

public class ActiondEventsReader
extends Object
implements Runnable

ActiondEventsReader holds the input stream of events - this stream is then parsed to get the events store that is a list of 'EventBlock's - the ActiondEventReceiver creates the ActiondEventsReader objects and adds them to the listener queue. From where the EventListener 'RunnableConsumerThread's thread pool, pick them up and parse the input stream in the object. The parsed objects are then added to the action Q where they are processed by ActionExec threads.

Version:
$Revision: 1.2 $
Author:
Mike, Sowmya Kumaraswamy, Brian Weaver, OpenNMS.org

Field Summary
private  List m_events
          the events in the input stream
private  InputStream m_inputStream
          The input stream that has the events
 
Constructor Summary
ActiondEventsReader(InputStream inpStream)
          Constructs the ActiondEventsReader object
 
Method Summary
 List getEvents()
          Returns the list of 'EventBlock's in the input stream
 void run()
          The EventListener holds a hashtable of 'EventsParser' objects for each thread in its 'RunnableConsumerThread' thread pool - the 'ActiondEventsReader' queries the EventListener for the parser for this thread and uses that to parse the input stream Once the parse is complete, the input stream is closed
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_inputStream

private InputStream m_inputStream
The input stream that has the events

m_events

private List m_events
the events in the input stream
Constructor Detail

ActiondEventsReader

public ActiondEventsReader(InputStream inpStream)
Constructs the ActiondEventsReader object
Parameters:
inpStream - the input stream to be parsed
Method Detail

run

public void run()
The EventListener holds a hashtable of 'EventsParser' objects for
 each thread in its 'RunnableConsumerThread' thread pool - the
 'ActiondEventsReader' queries the EventListener for the parser for this
 thread and uses that to parse the input stream

 Once the parse is complete, the input stream is closed
Specified by:
run in interface Runnable

getEvents

public List getEvents()
Returns the list of 'EventBlock's in the input stream
Returns:
the list of 'EventBlock's in the input stream