Class DefaultEventGateway.Builder
java.lang.Object
org.axonframework.eventhandling.gateway.AbstractEventGateway.Builder
org.axonframework.eventhandling.gateway.DefaultEventGateway.Builder
- Enclosing class:
DefaultEventGateway
A Builder class for
DefaultEventGateways.
The dispatchInterceptors are defaulted to an empty list.
The EventBus is a hard requirement and as such should be provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aDefaultEventGatewayas specified through this Builder.dispatchInterceptors(List<MessageDispatchInterceptor<? super EventMessage<?>>> dispatchInterceptors) dispatchInterceptors(MessageDispatchInterceptor<? super EventMessage<?>>... dispatchInterceptors) Sets theEventBusused to publish events.Methods inherited from class org.axonframework.eventhandling.gateway.AbstractEventGateway.Builder
validate
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
eventBus
Description copied from class:AbstractEventGateway.BuilderSets theEventBusused to publish events.- Overrides:
eventBusin classAbstractEventGateway.Builder- Parameters:
eventBus- anEventBusused to publish events- Returns:
- the current Builder instance, for fluent interfacing
-
dispatchInterceptors
public DefaultEventGateway.Builder dispatchInterceptors(MessageDispatchInterceptor<? super EventMessage<?>>... dispatchInterceptors) Description copied from class:AbstractEventGateway.BuilderSets theListofMessageDispatchInterceptors forEventMessages. Are invoked when an event is being dispatched.- Overrides:
dispatchInterceptorsin classAbstractEventGateway.Builder- Parameters:
dispatchInterceptors- which are invoked when an event is being dispatched- Returns:
- the current Builder instance, for fluent interfacing
-
dispatchInterceptors
public DefaultEventGateway.Builder dispatchInterceptors(List<MessageDispatchInterceptor<? super EventMessage<?>>> dispatchInterceptors) Description copied from class:AbstractEventGateway.BuilderSets theListofMessageDispatchInterceptors forEventMessages. Are invoked when an event is being dispatched.- Overrides:
dispatchInterceptorsin classAbstractEventGateway.Builder- Parameters:
dispatchInterceptors- which are invoked when an event is being dispatched- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aDefaultEventGatewayas specified through this Builder.- Returns:
- a
DefaultEventGatewayas specified through this Builder
-