Class DefaultCommandBusSpanFactory.Builder
java.lang.Object
org.axonframework.messaging.commandhandling.tracing.DefaultCommandBusSpanFactory.Builder
- Enclosing class:
DefaultCommandBusSpanFactory
Builder class to instantiate a
DefaultCommandBusSpanFactory. The default values are:
distributedCommandInSameTracedefaults totrue
spanFactory is a required field and should be provided.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aDefaultCommandBusSpanFactoryas specified through this Builder.distributedInSameTrace(boolean distributedInSameTrace) Sets whether theCommandMessages should be handled in the same trace as the dispatching span.spanFactory(SpanFactory spanFactory) Sets theSpanFactoryto use to create the spans.protected voidvalidate()Validates whether the fields contained in this builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
spanFactory
Sets theSpanFactoryto use to create the spans. This is a required field.- Parameters:
spanFactory- TheSpanFactoryto use to create the spans.- Returns:
- The current Builder instance, for fluent interfacing.
-
distributedInSameTrace
Sets whether theCommandMessages should be handled in the same trace as the dispatching span.- Parameters:
distributedInSameTrace- whether theCommandsMessagesshould be handled in the same trace as the dispatching span.- Returns:
- The current Builder instance, for fluent interfacing.
-
validate
protected void validate()Validates whether the fields contained in this builder are set accordingly. -
build
Initializes aDefaultCommandBusSpanFactoryas specified through this Builder.- Returns:
- The
DefaultCommandBusSpanFactoryas specified through this Builder.
-