Class AbstractConcurrentEventManager

    • Field Detail

      • _listeners

        protected final Collection _listeners
    • Constructor Detail

      • AbstractConcurrentEventManager

        public AbstractConcurrentEventManager()
        Default constructor.
    • Method Detail

      • isFailFast

        public boolean isFailFast()
        Whether to fail after the first exception thrown by any listener.
      • setFailFast

        public void setFailFast​(boolean failFast)
        Whether to fail after the first exception thrown by any listener.
      • hasListener

        public boolean hasListener​(Object listener)
        Return whether the given instance is in the list of listeners.
        Specified by:
        hasListener in interface EventManager
      • hasListeners

        public boolean hasListeners()
        Return true if there are any registered listeners.
        Specified by:
        hasListeners in interface EventManager
      • fireEvent

        protected abstract void fireEvent​(Object event,
                                          Object listener)
                                   throws Exception
        Implement this method to fire the given event to the given listener.
        Throws:
        Exception
      • newListenerCollection

        protected Collection newListenerCollection()
        Return a new concurrent container for listeners. Uses a CopyOnWriteArrayList by default.