Class NFEBasicEventDispatcher<U extends java.util.EventListener>

  • Type Parameters:
    U - The type of EventListener subclass
    All Implemented Interfaces:
    NFEEventDispatcher<U>

    public class NFEBasicEventDispatcher<U extends java.util.EventListener>
    extends java.lang.Object
    implements NFEEventDispatcher<U>
    An implementation of NFEEventDispatcher that fires all the event in a single thread.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispatch​(NFEModelEvent event, java.util.Collection<U> listeners, java.lang.String listenerMethodName)
      Notifies about an event to a collection of listeners by invoking the given method name.
      boolean isStopDispatchingAtFirstError()
      Tells whether the dispatcher stops firing events when an error ocurrs
      void setStopDispatchingAtFirstError​(boolean stopDispatchingAtFirstError)
      Sets the dispatcher to stop firing events if there is an error.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NFEBasicEventDispatcher

        public NFEBasicEventDispatcher()
    • Method Detail

      • dispatch

        public void dispatch​(NFEModelEvent event,
                             java.util.Collection<U> listeners,
                             java.lang.String listenerMethodName)
                      throws NFEEventDispatchException
        Description copied from interface: NFEEventDispatcher
        Notifies about an event to a collection of listeners by invoking the given method name.
        Specified by:
        dispatch in interface NFEEventDispatcher<U extends java.util.EventListener>
        Parameters:
        event - an NFEModelEvent (or subclass) instance
        listeners - a collection of listeners to be notified
        listenerMethodName - the method name to be invoked on the listeners
        Throws:
        NFEEventDispatchException
      • setStopDispatchingAtFirstError

        public void setStopDispatchingAtFirstError​(boolean stopDispatchingAtFirstError)
        Description copied from interface: NFEEventDispatcher
        Sets the dispatcher to stop firing events if there is an error. Otherwise, the dispatcher should fire any events as possible and throw the exception at the end
        Specified by:
        setStopDispatchingAtFirstError in interface NFEEventDispatcher<U extends java.util.EventListener>