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 |
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(CommandBus commandBus)
AbstractCommandGateway.BuilderCommandBus used to dispatch commands.commandBus in class AbstractCommandGateway.BuildercommandBus - a CommandBus used to dispatch commandspublic DefaultCommandGateway.Builder retryScheduler(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–2018. All rights reserved.