Class 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, further processing of that event Log is stopped.
    Author:
    Sowmya Nataraj , OpenNMS.org
    • Constructor Detail

      • DefaultEventHandlerImpl

        public DefaultEventHandlerImpl​(com.codahale.metrics.MetricRegistry registry)

        Constructor for DefaultEventHandlerImpl.

    • Method Detail

      • createRunnable

        public org.opennms.netmgt.eventd.DefaultEventHandlerImpl.EventHandlerRunnable createRunnable​(Log eventLog)
        Description copied from interface: EventHandler
        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
      • createRunnable

        public org.opennms.netmgt.eventd.DefaultEventHandlerImpl.EventHandlerRunnable createRunnable​(Log eventLog,
                                                                                                     boolean synchronous)
        Description copied from interface: EventHandler
        Create a Runnable to handle the passed-in event Log.
        Specified by:
        createRunnable in interface EventHandler
        Parameters:
        eventLog - events to be processed
        synchronous - Whether the runnable should wait for all processors to finish processing before returning
        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.
      • getLogEventSummaries

        public boolean getLogEventSummaries()
      • setLogEventSummaries

        public void setLogEventSummaries​(boolean logEventSummaries)
      • setNodeDao

        public void setNodeDao​(NodeDao nodeDao)
      • getNodeDao

        public NodeDao getNodeDao()