Package org.axonframework.eventhandling
Interface EventBus
- All Superinterfaces:
MessageDispatchInterceptorSupport<EventMessage<?>>,SubscribableMessageSource<EventMessage<?>>
- All Known Subinterfaces:
EventStore
- All Known Implementing Classes:
AbstractEventBus,AbstractEventStore,AxonServerEventStore,EmbeddedEventStore,EmbeddedEventStore,SimpleEventBus
public interface EventBus
extends SubscribableMessageSource<EventMessage<?>>, MessageDispatchInterceptorSupport<EventMessage<?>>
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 Summary
Modifier and TypeMethodDescriptionvoidpublish(List<? extends EventMessage<?>> events) Publish a collection of events on this bus (one, or multiple).default voidpublish(EventMessage<?>... events) Publish a collection of events on this bus (one, or multiple).Methods inherited from interface org.axonframework.messaging.MessageDispatchInterceptorSupport
registerDispatchInterceptorMethods inherited from interface org.axonframework.messaging.SubscribableMessageSource
subscribe
-
Method Details
-
publish
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
eventsas a single batch and distribute the events as such to all subscribed EventListeners.- Parameters:
events- The collection of events to publish
-
publish
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
eventsas a single batch and distribute the events as such to all subscribed EventListeners.- Parameters:
events- The collection of events to publish
-