public interface EventService
Modifier and Type | Method and Description |
---|---|
void |
addHandler(java.lang.String eventType,
SHandler<SEvent> userHandler)
Add the given handler to the Event Manager's handlers list.
|
void |
fireEvent(SEvent event)
Fire the specified Event to the registered handlers.
|
java.util.Set<SHandler<SEvent>> |
getHandlers(java.lang.String eventType)
Retrieve the list of all registered Handlers or the given EventType
|
boolean |
hasHandlers(java.lang.String eventType,
EventActionType actionType)
Allows to check if an handler is listening to this event type
|
void |
removeAllHandlers(SHandler<SEvent> handler)
Remove the given handler from the Event Service's handlers lists.
|
void |
removeHandler(java.lang.String eventType,
SHandler<SEvent> handler)
Remove the given handler from the given event type filter
|
void fireEvent(SEvent event) throws SFireEventException
event
- A specific EventSFireEventException
boolean hasHandlers(java.lang.String eventType, EventActionType actionType)
eventType
- the type of the eventvoid addHandler(java.lang.String eventType, SHandler<SEvent> userHandler) throws HandlerRegistrationException
eventType
- The type of the event the handler is interested in.userHandler
- The handler to register in the Event ManagerHandlerRegistrationException
void removeAllHandlers(SHandler<SEvent> handler) throws HandlerUnregistrationException
handler
- The handler to removeHandlerUnregistrationException
void removeHandler(java.lang.String eventType, SHandler<SEvent> handler) throws HandlerUnregistrationException
handler
- The handler to remove from the given event typeHandlerUnregistrationException