Package org.axonframework.eventhandling
Class AbstractEventBus.Builder
java.lang.Object
org.axonframework.eventhandling.AbstractEventBus.Builder
- Direct Known Subclasses:
AbstractEventStore.Builder,SimpleEventBus.Builder
- Enclosing class:
AbstractEventBus
Abstract Builder class to instantiate
AbstractEventBus implementations.
The MessageMonitor is defaulted to an NoOpMessageMonitor and the EventBusSpanFactory
defaults to a DefaultEventBusSpanFactory backed by a NoOpSpanFactory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmessageMonitor(MessageMonitor<? super EventMessage<?>> messageMonitor) Sets theMessageMonitorto monitor ingestedEventMessages.spanFactory(EventBusSpanFactory spanFactory) Sets theSpanFactoryimplementation to use for providing tracing capabilities.spanFactory(SpanFactory spanFactory) Deprecated.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
messageMonitor
public AbstractEventBus.Builder messageMonitor(@Nonnull MessageMonitor<? super EventMessage<?>> messageMonitor) - Parameters:
messageMonitor- aMessageMonitorto monitor ingestedEventMessages- Returns:
- the current Builder instance, for fluent interfacing
-
spanFactory
Deprecated.Please usespanFactory(EventBusSpanFactory)which is more configurableSets theSpanFactoryimplementation to use for providing tracing capabilities. Defaults to aNoOpSpanFactoryby default, which provides no tracing capabilities.- Parameters:
spanFactory- TheSpanFactoryimplementation- Returns:
- The current Builder instance, for fluent interfacing.
-
spanFactory
Sets theSpanFactoryimplementation to use for providing tracing capabilities. Defaults to aDefaultEventBusSpanFactorybacked by aNoOpSpanFactoryby default, which provides no tracing capabilities.- Parameters:
spanFactory- TheEventBusSpanFactoryimplementation- Returns:
- The current Builder instance, for fluent interfacing.
-
validate
Validates whether the fields contained in this Builder are set accordingly.- Throws:
AxonConfigurationException- if one field is asserted to be incorrect according to the Builder's specifications
-
spanFactory(EventBusSpanFactory)which is more configurable