Interface EventBus

All Superinterfaces:
MessageDispatchInterceptorSupport<EventMessage<?>>, SubscribableMessageSource<EventMessage<?>>
All Known Subinterfaces:
EventStore
All Known Implementing Classes:
AbstractEventBus, AbstractEventStore, AxonServerEventStore, EmbeddedEventStore, EmbeddedEventStore, SimpleEventBus

Specification of the mechanism on which the Event Listeners can subscribe for events and event publishers can publish their events. The event bus dispatches events to all subscribed listeners.

Implementations may or may not dispatch the events to event listeners in the dispatching thread.

Since:
0.1
Author:
Allard Buijze
See Also:
  • Method Details

    • publish

      default void publish(EventMessage<?>... events)
      Publish a collection of events on this bus (one, or multiple). The events will be dispatched to all subscribed listeners.

      Implementations may treat the given events as a single batch and distribute the events as such to all subscribed EventListeners.

      Parameters:
      events - The collection of events to publish
    • publish

      void publish(@Nonnull List<? extends EventMessage<?>> events)
      Publish a collection of events on this bus (one, or multiple). The events will be dispatched to all subscribed listeners.

      Implementations may treat the given events as a single batch and distribute the events as such to all subscribed EventListeners.

      Parameters:
      events - The collection of events to publish