Interface EventDispatcher

All Known Implementing Classes:
SimpleEventDispatcher

public interface EventDispatcher
Registry with all event handlers.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dispatchCommonEvents(@NotNull List<org.fuin.esc.api.CommonEvent> commonEvents)
    Dispatch all common events to the appropriate event handler.
    void
    dispatchEvent(@NotNull org.fuin.ddd4j.ddd.Event event)
    Dispatches the given event to the appropriate event handler.
    void
    dispatchEvents(@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

      @NotNull @NotNull Set<org.fuin.ddd4j.ddd.EventType> getAllTypes()
      Returns a set of all known types.
      Returns:
      All known event types.
    • dispatchCommonEvents

      void dispatchCommonEvents(@NotNull @NotNull List<org.fuin.esc.api.CommonEvent> commonEvents)
      Dispatch all common events to the appropriate event handler.
      Parameters:
      commonEvents - Events to dispatch.
    • dispatchEvents

      void dispatchEvents(@NotNull @NotNull List<org.fuin.ddd4j.ddd.Event> events)
      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.