public abstract class AbstractEventGateway extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractEventGateway.Builder
Abstract Builder class to instantiate
AbstractEventGateway implementations. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEventGateway(AbstractEventGateway.Builder builder)
Instantiate an
AbstractEventGateway based on the fields contained in the AbstractEventGateway.Builder. |
| Modifier and Type | Method and Description |
|---|---|
EventBus |
getEventBus()
Returns the EventBus used by this EventGateway.
|
protected <E> EventMessage<? extends E> |
processInterceptors(EventMessage<E> eventMessage)
Invokes all the dispatch interceptors and returns the EventMessage instance that should be dispatched.
|
protected void |
publish(Object event)
Publishes (dispatches) an event.
|
Registration |
registerDispatchInterceptor(MessageDispatchInterceptor<? super EventMessage<?>> interceptor)
Registers an event dispatch interceptor within an
EventGateway. |
protected AbstractEventGateway(AbstractEventGateway.Builder builder)
AbstractEventGateway based on the fields contained in the AbstractEventGateway.Builder.
Will assert that the EventBus is not null and throws an AxonConfigurationException
if it is.
builder - the AbstractEventGateway.Builder used to instantiate a AbstractEventGateway instanceprotected void publish(@Nonnull Object event)
event - The event to publish.public Registration registerDispatchInterceptor(@Nonnull MessageDispatchInterceptor<? super EventMessage<?>> interceptor)
EventGateway.interceptor - To intercept event messagesprotected <E> EventMessage<? extends E> processInterceptors(EventMessage<E> eventMessage)
eventMessage - The incoming event messagepublic EventBus getEventBus()
Copyright © 2010–2023. All rights reserved.