org.opennms.netmgt.eventd
Class DefaultEventHandlerImpl

java.lang.Object
  extended by org.opennms.netmgt.eventd.DefaultEventHandlerImpl
All Implemented Interfaces:
EventHandler, org.springframework.beans.factory.InitializingBean

public final class DefaultEventHandlerImpl
extends Object
implements org.springframework.beans.factory.InitializingBean, EventHandler

The EventHandler builds Runnables that essentially do all the work on an incoming event. Operations done on an incoming event are handled by the List of injected EventProcessors, in the order in which they are given in the list. If any of them throw an exception, futher processing of that event Log is stopped.

Author:
Sowmya Nataraj , OpenNMS.org

Nested Class Summary
 class DefaultEventHandlerImpl.EventHandlerRunnable
           
 
Constructor Summary
DefaultEventHandlerImpl()
          Constructor for DefaultEventHandlerImpl.
 
Method Summary
 void afterPropertiesSet()
          afterPropertiesSet
 DefaultEventHandlerImpl.EventHandlerRunnable createRunnable(Log eventLog)
          Create a Runnable to handle the passed-in event Log.
 List<EventProcessor> getEventProcessors()
          getEventProcessors
 void setEventProcessors(List<EventProcessor> eventProcessors)
          setEventProcessors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEventHandlerImpl

public DefaultEventHandlerImpl()

Constructor for DefaultEventHandlerImpl.

Method Detail

createRunnable

public DefaultEventHandlerImpl.EventHandlerRunnable createRunnable(Log eventLog)
Create a Runnable to handle the passed-in event Log.

Specified by:
createRunnable in interface EventHandler
Parameters:
eventLog - events to be processed
Returns:
a ready-to-run Runnable that will process the events

afterPropertiesSet

public void afterPropertiesSet()
                        throws IllegalStateException

afterPropertiesSet

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
IllegalStateException - if any.

getEventProcessors

public List<EventProcessor> getEventProcessors()

getEventProcessors

Returns:
a List object.

setEventProcessors

public void setEventProcessors(List<EventProcessor> eventProcessors)

setEventProcessors

Parameters:
eventProcessors - a List object.


Copyright © 2011. All Rights Reserved.