public static class DefaultCommandGateway.Builder extends AbstractCommandGateway.Builder
DefaultCommandGateway.
The dispatchInterceptors are defaulted to an empty list.
The CommandBus is a hard requirements and as such should be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
DefaultCommandGateway |
build()
Initializes a
DefaultCommandGateway as specified through this Builder. |
DefaultCommandGateway.Builder |
commandBus(CommandBus commandBus)
Sets the
CommandBus used to dispatch commands. |
DefaultCommandGateway.Builder |
commandCallback(CommandCallback<Object,Object> commandCallback)
Set a
CommandCallback on the command bus. |
DefaultCommandGateway.Builder |
dispatchInterceptors(List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors)
|
DefaultCommandGateway.Builder |
dispatchInterceptors(MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors)
|
DefaultCommandGateway.Builder |
retryScheduler(RetryScheduler retryScheduler)
Sets the
RetryScheduler capable of performing retries of failed commands. |
validatepublic DefaultCommandGateway.Builder commandBus(@Nonnull CommandBus commandBus)
AbstractCommandGateway.BuilderCommandBus used to dispatch commands.commandBus in class AbstractCommandGateway.BuildercommandBus - a CommandBus used to dispatch commandspublic DefaultCommandGateway.Builder commandCallback(CommandCallback<Object,Object> commandCallback)
CommandCallback on the command bus. This will be used as callback for all asynchronous
commands that are sent.
By default, the FailureLoggingCallback is used. This will log to the default logger on failure.commandCallback - The CommandCallback to use for asynchronous commandspublic DefaultCommandGateway.Builder retryScheduler(@Nonnull RetryScheduler retryScheduler)
AbstractCommandGateway.BuilderRetryScheduler capable of performing retries of failed commands. May be null when to
prevent retries.retryScheduler in class AbstractCommandGateway.BuilderretryScheduler - a RetryScheduler capable of performing retries of failed commandspublic DefaultCommandGateway.Builder dispatchInterceptors(MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors)
AbstractCommandGateway.BuilderList of MessageDispatchInterceptors for CommandMessages.
Are invoked when a command is being dispatched.dispatchInterceptors in class AbstractCommandGateway.BuilderdispatchInterceptors - which are invoked when a command is being dispatchedpublic DefaultCommandGateway.Builder dispatchInterceptors(List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors)
AbstractCommandGateway.BuilderList of MessageDispatchInterceptors for CommandMessages.
Are invoked when a command is being dispatched.dispatchInterceptors in class AbstractCommandGateway.BuilderdispatchInterceptors - which are invoked when a command is being dispatchedpublic DefaultCommandGateway build()
DefaultCommandGateway as specified through this Builder.DefaultCommandGateway as specified through this BuilderCopyright © 2010–2023. All rights reserved.