- All Known Implementing Classes:
SimpleEventDispatcher
public interface EventDispatcher
Registry with all event handlers.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchCommonEvents(@NotNull List<org.fuin.esc.api.CommonEvent> commonEvents) Dispatch all common events to the appropriate event handler.voiddispatchEvent(@NotNull org.fuin.ddd4j.ddd.Event event) Dispatches the given event to the appropriate event handler.voiddispatchEvents(@NotNull List<org.fuin.ddd4j.ddd.Event> events) Dispatch all events to the appropriate event handler.@NotNull Set<org.fuin.ddd4j.ddd.EventType>Returns a set of all known types.
-
Method Details
-
getAllTypes
Returns a set of all known types.- Returns:
- All known event types.
-
dispatchCommonEvents
Dispatch all common events to the appropriate event handler.- Parameters:
commonEvents- Events to dispatch.
-
dispatchEvents
Dispatch all events to the appropriate event handler.- Parameters:
events- Events to dispatch.
-
dispatchEvent
void dispatchEvent(@NotNull @NotNull org.fuin.ddd4j.ddd.Event event) Dispatches the given event to the appropriate event handler. The event is ignored if no event handler can be found that is capable of handling it.- Parameters:
event- Event to dispatch.
-