Class AbstractEventServiceImpl
java.lang.Object
org.bonitasoft.engine.events.impl.AbstractEventServiceImpl
- All Implemented Interfaces:
EventService
- Direct Known Subclasses:
EventServiceImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddHandler(String eventType, SHandler<SEvent> handler) No handler duplication in a list for a given event typeprotected abstract voidaddHandlerFor(String eventType, SHandler<SEvent> handler) protected abstract booleancontainsHandlerFor(String type) voidFire the given Event only to interested handlersgetHandlers(String eventType) Retrieve the list of all registered Handlers or the given EventTypeprotected abstract Collection<SHandler<SEvent>>getHandlersFor(String type) protected abstract org.slf4j.Loggerfinal booleanhasHandlers(String eventType, EventActionType actionType) Allows to check if an handler is listening to this event typefinal voidremoveAllHandlers(SHandler<SEvent> handler) Remove the given handler from the Event Service's handlers lists.protected abstract voidremoveAllHandlersFor(SHandler<SEvent> handler) final voidremoveHandler(String eventType, SHandler<SEvent> h) Remove the given handler from the given event type filterprotected abstract voidremoveHandlerFor(String eventType, SHandler<SEvent> h)
-
Constructor Details
-
AbstractEventServiceImpl
protected AbstractEventServiceImpl()
-
-
Method Details
-
getLogger
protected abstract org.slf4j.Logger getLogger() -
fireEvent
Fire the given Event only to interested handlers- Specified by:
fireEventin interfaceEventService- Parameters:
event- A specific Event- Throws:
SFireEventException
-
getHandlersFor
-
containsHandlerFor
-
addHandler
public final void addHandler(String eventType, SHandler<SEvent> handler) throws HandlerRegistrationException No handler duplication in a list for a given event type- Specified by:
addHandlerin interfaceEventService- Parameters:
eventType- The type of the event the handler is interested in.handler- The handler to register in the Event Manager- Throws:
HandlerRegistrationException
-
addHandlerFor
protected abstract void addHandlerFor(String eventType, SHandler<SEvent> handler) throws HandlerRegistrationException - Throws:
HandlerRegistrationException
-
removeAllHandlers
Description copied from interface:EventServiceRemove the given handler from the Event Service's handlers lists.- Specified by:
removeAllHandlersin interfaceEventService- Parameters:
handler- The handler to remove- Throws:
HandlerUnregistrationException
-
removeAllHandlersFor
-
removeHandler
public final void removeHandler(String eventType, SHandler<SEvent> h) throws HandlerUnregistrationException Description copied from interface:EventServiceRemove the given handler from the given event type filter- Specified by:
removeHandlerin interfaceEventServiceh- The handler to remove from the given event type- Throws:
HandlerUnregistrationException
-
removeHandlerFor
protected abstract void removeHandlerFor(String eventType, SHandler<SEvent> h) throws HandlerUnregistrationException - Parameters:
eventType-h-- Throws:
HandlerUnregistrationException
-
getHandlers
Description copied from interface:EventServiceRetrieve the list of all registered Handlers or the given EventType- Specified by:
getHandlersin interfaceEventService
-
hasHandlers
Description copied from interface:EventServiceAllows to check if an handler is listening to this event type- Specified by:
hasHandlersin interfaceEventService- Parameters:
eventType- the type of the event- Returns:
- true if an handler is interested by the event having type eventType
-