public static class AsynchronousCommandBus.Builder extends SimpleCommandBus.Builder
AsynchronousCommandBus.
The TransactionManager, MessageMonitor, RollbackConfiguration and Executor are
respectively defaulted to a NoTransactionManager, a NoOpMessageMonitor, a
RollbackConfigurationType.UNCHECKED_EXCEPTIONS and a Executors.newCachedThreadPool(). The default
executor uses an AxonThreadFactory to create threads with a sensible naming scheme. The
TransactionManager, MessageMonitor, RollbackConfiguration and Executor are hard requirements. Thus setting
them to null will result in an AxonConfigurationException.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
AsynchronousCommandBus |
build()
Initializes a
AsynchronousCommandBus as specified through this Builder. |
AsynchronousCommandBus.Builder |
executor(Executor executor)
Sets the
Executor which processes the Command dispatching threads. |
AsynchronousCommandBus.Builder |
messageMonitor(MessageMonitor<? super CommandMessage<?>> messageMonitor)
Sets the
MessageMonitor of generic type CommandMessage used the to monitor the command bus. |
AsynchronousCommandBus.Builder |
rollbackConfiguration(RollbackConfiguration rollbackConfiguration)
Sets the
RollbackConfiguration which allows you to specify when a UnitOfWork should be rolled
back. |
AsynchronousCommandBus.Builder |
transactionManager(TransactionManager transactionManager)
Sets the
TransactionManager used to manage transactions. |
validatepublic AsynchronousCommandBus.Builder transactionManager(TransactionManager transactionManager)
SimpleCommandBus.BuilderTransactionManager used to manage transactions. Defaults to a NoTransactionManager.transactionManager in class SimpleCommandBus.BuildertransactionManager - a TransactionManager used to manage transactionspublic AsynchronousCommandBus.Builder messageMonitor(MessageMonitor<? super CommandMessage<?>> messageMonitor)
SimpleCommandBus.BuilderMessageMonitor of generic type CommandMessage used the to monitor the command bus.
Defaults to a NoOpMessageMonitor.messageMonitor in class SimpleCommandBus.BuildermessageMonitor - a MessageMonitor used the message monitor to monitor the command buspublic AsynchronousCommandBus.Builder rollbackConfiguration(RollbackConfiguration rollbackConfiguration)
SimpleCommandBus.BuilderRollbackConfiguration which allows you to specify when a UnitOfWork should be rolled
back. Defaults to a RollbackConfigurationType.UNCHECKED_EXCEPTIONS, which triggers a rollback on all
unchecked exceptions.rollbackConfiguration in class SimpleCommandBus.BuilderrollbackConfiguration - a RollbackConfiguration specifying when a UnitOfWork should be
rolled backpublic AsynchronousCommandBus.Builder executor(Executor executor)
Executor which processes the Command dispatching threads.executor - a Executor to processes the Command dispatching threadspublic AsynchronousCommandBus build()
AsynchronousCommandBus as specified through this Builder.build in class SimpleCommandBus.BuilderAsynchronousCommandBus as specified through this BuilderCopyright © 2010–2018. All rights reserved.