Interface IEventBroker


  • public interface IEventBroker
    Event broker is events/messages broker, intended to notify listeners about new events/messages by type.
    • Method Detail

      • notifyListeners

        void notifyListeners​(IEvent event)
        Send notification of specified type from specified project
        Parameters:
        event - the event (cannot be null)
      • addListener

        void addListener​(Collection<Class<? extends IEvent>> types,
                         Predicate<IEvent> filter,
                         IEventListener listener)
        Add event listener
        Parameters:
        types - the collection of supported event types (not null)
        filter - the predicate to filter supported events or null
        listener - the event listener to add (not null)
      • addListener

        void addListener​(Class<? extends IEvent> type,
                         Predicate<IEvent> filter,
                         IEventListener listener)
        Add event listener
        Parameters:
        type - the supported event type (not null)
        filter - the predicate to filter supported events or null
        listener - the event listener to add (not null)
      • removeListener

        void removeListener​(IEventListener listener)
        Remove event listener
        Parameters:
        listener - the event listener to remove (not null)