Class EventsImpl

  • All Implemented Interfaces:
    Events

    @Service
    public class EventsImpl
    extends Object
    implements Events
    Simple implementation of the events dispatching facility.
    Author:
    Jerome Dochez
    • Constructor Detail

      • EventsImpl

        public EventsImpl()
    • Method Detail

      • register

        public void register​(EventListener listener)
        Description copied from interface: Events
        Registers a new listener for global events
        Specified by:
        register in interface Events
        Parameters:
        listener - the new listener
      • send

        public void send​(EventListener.Event event)
        Description copied from interface: Events
        Sends a event asynchronously
        Specified by:
        send in interface Events
        Parameters:
        event - event to send
      • send

        public void send​(EventListener.Event event,
                         boolean asynchronously)
        Description copied from interface: Events
        Sends a event to all listener synchronously or asynchronously.
        Specified by:
        send in interface Events
        Parameters:
        event - event to send
        asynchronously - true if the event should be sent asynchronously
      • unregister

        public boolean unregister​(EventListener listener)
        Description copied from interface: Events
        Unregisteres a listener
        Specified by:
        unregister in interface Events
        Parameters:
        listener - the register to remove
        Returns:
        true if the removal was successful