public static class SpringHttpCommandBusConnector.Builder extends Object
SpringHttpCommandBusConnector.
The Executor is defaulted to a DirectExecutor.INSTANCE and the SpanFactory to a
NoOpSpanFactory instance. The localCommandBus of type (@link CommandBus}, the
RestOperations and the Serializer are hard requirements and as such should be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
SpringHttpCommandBusConnector |
build()
Initializes a
SpringHttpCommandBusConnector as specified through this Builder. |
SpringHttpCommandBusConnector.Builder |
executor(Executor executor)
Sets the
Executor used to "asynchronously" perform sending of the command messages to other nodes and
handling commands from other nodes. |
SpringHttpCommandBusConnector.Builder |
localCommandBus(org.axonframework.commandhandling.CommandBus localCommandBus)
Sets the
localCommandBus of type CommandBus to publish received commands which to the local
segment. |
SpringHttpCommandBusConnector.Builder |
restOperations(org.springframework.web.client.RestOperations restOperations)
Sets the
RestOperations used to send commands to other nodes. |
SpringHttpCommandBusConnector.Builder |
serializer(org.axonframework.serialization.Serializer serializer)
Sets the
Serializer used to serialize command messages when they are sent between nodes. |
SpringHttpCommandBusConnector.Builder |
spanFactory(org.axonframework.tracing.SpanFactory spanFactory)
Sets the
SpanFactory used to attach span information from incoming commands. |
protected void |
validate()
Validate whether the fields contained in this Builder as set accordingly.
|
public SpringHttpCommandBusConnector.Builder localCommandBus(org.axonframework.commandhandling.CommandBus localCommandBus)
localCommandBus of type CommandBus to publish received commands which to the local
segment.localCommandBus - the CommandBus to publish received commands which to the local segmentpublic SpringHttpCommandBusConnector.Builder restOperations(org.springframework.web.client.RestOperations restOperations)
RestOperations used to send commands to other nodes.restOperations - the RestOperations used to send commands to other nodespublic SpringHttpCommandBusConnector.Builder serializer(org.axonframework.serialization.Serializer serializer)
Serializer used to serialize command messages when they are sent between nodes.serializer - the Serializer used to serialize command messages when they are sent between nodespublic SpringHttpCommandBusConnector.Builder executor(Executor executor)
Executor used to "asynchronously" perform sending of the command messages to other nodes and
handling commands from other nodes. To make sending and handling fully asynchronous, it is recommended to use
an Executor that use different threads or spawns new threads.
Defaults to a DirectExecutor.INSTANCE for backwards compatibility.
executor - A Executor used to "asynchronously" perform sending of the command messages to other
nodes and handling commands from other nodes.public SpringHttpCommandBusConnector.Builder spanFactory(org.axonframework.tracing.SpanFactory spanFactory)
SpanFactory used to attach span information from incoming commands. Defaults to a
NoOpSpanFactory instance.spanFactory - The SpanFactory used to attach span information from incoming commands.public SpringHttpCommandBusConnector build()
SpringHttpCommandBusConnector as specified through this Builder.SpringHttpCommandBusConnector as specified through this Builderprotected void validate()
org.axonframework.common.AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2023. All rights reserved.