public class DefaultEventGateway extends AbstractEventGateway implements EventGateway
EventDispatchInterceptors
.
The Event Dispatch Interceptors can intercept and alter events dispatched on this specific gateway. Typically,
this would be used to add gateway specific meta data to the Event.Modifier and Type | Class and Description |
---|---|
static class |
DefaultEventGateway.Builder
A Builder class for
DefaultEventGateway s. |
Modifier | Constructor and Description |
---|---|
protected |
DefaultEventGateway(DefaultEventGateway.Builder builder)
Instantiate a
DefaultEventGateway based on the fields contained in the DefaultEventGateway.Builder . |
Modifier and Type | Method and Description |
---|---|
static DefaultEventGateway.Builder |
builder()
Instantiate a Builder to be able to create a
DefaultEventGateway . |
void |
publish(List<?> events)
Publish a collection of events on this bus (one, or multiple).
|
getEventBus, processInterceptors, publish, registerDispatchInterceptor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
publish
registerDispatchInterceptor
protected DefaultEventGateway(DefaultEventGateway.Builder builder)
DefaultEventGateway
based on the fields contained in the DefaultEventGateway.Builder
.
Will assert that the EventBus
is not null
and will throw an AxonConfigurationException
if this is the case.
builder
- the DefaultEventGateway.Builder
used to instantiate a DefaultEventGateway
instancepublic static DefaultEventGateway.Builder builder()
DefaultEventGateway
.
The dispatchInterceptors
are defaulted to an empty list.
The EventBus
is a hard requirement and as such should be provided.
DefaultEventGateway
public void publish(@Nonnull List<?> events)
EventGateway
Implementations may treat the given events
as a single batch and distribute the events as such to all
subscribed EventListeners.
publish
in interface EventGateway
events
- The collection of events to publishCopyright © 2010–2024. All rights reserved.