ostore.oil
Class EventCountStage

java.lang.Object
  |
  +--ostore.oil.EventCountStage
All Implemented Interfaces:
EventHandlerIF

public class EventCountStage
extends Object
implements EventHandlerIF

EventCountStage watches for events of certain types, and counts them. Pretty simple. To use, create an EventCountStage stage in the config file, and in the initargs sections have the line:

events Event1 Event2 . . . EventN
where events 1 through N are the events you want to keep track of. When you want to know the count of a certain even, send out a EventCountRequestMsg, and this stage will send you back an EventCountMsg with the count. Currently this functionality is pretty simple, but possibly later we can add support for rates, thresholds, etc.

Version:
$Id: EventCountStage.java,v 1.7 2002/07/22 20:54:53 srhea Exp $
Author:
Jeremy Stribling

Constructor Summary
EventCountStage()
           
 
Method Summary
 void destroy()
           
 void handleEvent(QueueElementIF element)
           
 void handleEvents(QueueElementIF[] elemarr)
           
 void init(ConfigDataIF config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventCountStage

public EventCountStage()
Method Detail

handleEvents

public void handleEvents(QueueElementIF[] elemarr)
                  throws EventHandlerException
Specified by:
handleEvents in interface EventHandlerIF
EventHandlerException

handleEvent

public void handleEvent(QueueElementIF element)
                 throws EventHandlerException
Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Exception

destroy

public void destroy()
Specified by:
destroy in interface EventHandlerIF