public abstract static class AbstractEventGateway.Builder extends Object
AbstractEventGateway implementations.
The dispatchInterceptors are defaulted to an empty list.
The EventBus is a hard requirement and as such should be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
AbstractEventGateway.Builder |
dispatchInterceptors(List<MessageDispatchInterceptor<? super EventMessage<?>>> dispatchInterceptors)
|
AbstractEventGateway.Builder |
dispatchInterceptors(MessageDispatchInterceptor<? super EventMessage<?>>... dispatchInterceptors)
|
AbstractEventGateway.Builder |
eventBus(EventBus eventBus)
Sets the
EventBus used to publish events. |
protected void |
validate()
Validate whether the fields contained in this Builder as set accordingly.
|
public AbstractEventGateway.Builder eventBus(EventBus eventBus)
EventBus used to publish events.eventBus - an EventBus used to publish eventspublic AbstractEventGateway.Builder dispatchInterceptors(MessageDispatchInterceptor<? super EventMessage<?>>... dispatchInterceptors)
List of MessageDispatchInterceptors for EventMessages.
Are invoked when an event is being dispatched.dispatchInterceptors - which are invoked when an event is being dispatchedpublic AbstractEventGateway.Builder dispatchInterceptors(List<MessageDispatchInterceptor<? super EventMessage<?>>> dispatchInterceptors)
List of MessageDispatchInterceptors for EventMessages.
Are invoked when an event is being dispatched.dispatchInterceptors - which are invoked when an event is being dispatchedprotected void validate()
AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2020. All rights reserved.