Interface EventGateway

All Superinterfaces:
MessageDispatchInterceptorSupport<EventMessage<?>>
All Known Implementing Classes:
DefaultEventGateway

public interface EventGateway extends MessageDispatchInterceptorSupport<EventMessage<?>>
Interface towards the Event Handling components of an application. This interface provides a friendlier API toward the event bus. The EventGateway allows for components to easily publish events.
Since:
4.1
Author:
Bert Laverman
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    publish(Object... events)
    Publish a collection of events on this bus (one, or multiple).
    void
    publish(List<?> events)
    Publish a collection of events on this bus (one, or multiple).

    Methods inherited from interface org.axonframework.messaging.MessageDispatchInterceptorSupport

    registerDispatchInterceptor
  • Method Details

    • publish

      default void publish(Object... 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<?> 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. When the given events is an empty list, nothing happens.

      Parameters:
      events - The collection of events to publish