Package org.axonframework.eventhandling
Class SimpleEventBus.Builder
java.lang.Object
org.axonframework.eventhandling.AbstractEventBus.Builder
org.axonframework.eventhandling.SimpleEventBus.Builder
- Enclosing class:
SimpleEventBus
Builder class to instantiate a
SimpleEventBus.
The MessageMonitor is defaulted to a NoOpMessageMonitor and the SpanFactory is defaulted
to DefaultEventBusSpanFactory backed by a NoOpSpanFactory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aSimpleEventBusas specified through this Builder.messageMonitor(MessageMonitor<? super EventMessage<?>> messageMonitor) Sets theMessageMonitorto monitor ingestedEventMessages.spanFactory(EventBusSpanFactory spanFactory) Sets theSpanFactoryimplementation to use for providing tracing capabilities.spanFactory(SpanFactory spanFactory) Sets theSpanFactoryimplementation to use for providing tracing capabilities.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
messageMonitor
public SimpleEventBus.Builder messageMonitor(@Nonnull MessageMonitor<? super EventMessage<?>> messageMonitor) Description copied from class:AbstractEventBus.Builder- Overrides:
messageMonitorin classAbstractEventBus.Builder- Parameters:
messageMonitor- aMessageMonitorto monitor ingestedEventMessages- Returns:
- the current Builder instance, for fluent interfacing
-
spanFactory
Description copied from class:AbstractEventBus.BuilderSets theSpanFactoryimplementation to use for providing tracing capabilities. Defaults to aNoOpSpanFactoryby default, which provides no tracing capabilities.- Overrides:
spanFactoryin classAbstractEventBus.Builder- Parameters:
spanFactory- TheSpanFactoryimplementation- Returns:
- The current Builder instance, for fluent interfacing.
-
spanFactory
Description copied from class:AbstractEventBus.BuilderSets theSpanFactoryimplementation to use for providing tracing capabilities. Defaults to aDefaultEventBusSpanFactorybacked by aNoOpSpanFactoryby default, which provides no tracing capabilities.- Overrides:
spanFactoryin classAbstractEventBus.Builder- Parameters:
spanFactory- TheEventBusSpanFactoryimplementation- Returns:
- The current Builder instance, for fluent interfacing.
-
build
Initializes aSimpleEventBusas specified through this Builder.- Returns:
- a
SimpleEventBusas specified through this Builder
-
validate
Validates whether the fields contained in this Builder are set accordingly.- Overrides:
validatein classAbstractEventBus.Builder- Throws:
AxonConfigurationException- if one field is asserted to be incorrect according to the Builder's specifications
-