Interface EventService

  • All Known Implementing Classes:
    AbstractEventServiceImpl, EventServiceImpl

    public interface EventService
    This is the manager of all the events triggered by other services. Handlers are registered into the Event service. When a service fire an event, it calls the right handler corresponding to the given Event.
    Since:
    6.0
    Author:
    Christophe Havard, Baptiste Mesta
    • Method Detail

      • hasHandlers

        boolean hasHandlers​(java.lang.String eventType,
                            EventActionType actionType)
        Allows to check if an handler is listening to this event type
        Parameters:
        eventType - the type of the event
        Returns:
        true if an handler is interested by the event having type eventType
      • addHandler

        void addHandler​(java.lang.String eventType,
                        SHandler<SEvent> userHandler)
                 throws HandlerRegistrationException
        Add the given handler to the Event Manager's handlers list.
        Parameters:
        eventType - The type of the event the handler is interested in.
        userHandler - The handler to register in the Event Manager
        Throws:
        HandlerRegistrationException
      • getHandlers

        java.util.Set<SHandler<SEvent>> getHandlers​(java.lang.String eventType)
        Retrieve the list of all registered Handlers or the given EventType