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. |
validate
public DefaultCommandGateway.Builder commandBus(CommandBus commandBus)
AbstractCommandGateway.Builder
CommandBus
used to dispatch commands.commandBus
in class AbstractCommandGateway.Builder
commandBus
- a CommandBus
used to dispatch commandspublic DefaultCommandGateway.Builder retryScheduler(RetryScheduler retryScheduler)
AbstractCommandGateway.Builder
RetryScheduler
capable of performing retries of failed commands. May be null
when
to prevent retries.retryScheduler
in class AbstractCommandGateway.Builder
retryScheduler
- a RetryScheduler
capable of performing retries of failed commandspublic DefaultCommandGateway.Builder dispatchInterceptors(MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors)
AbstractCommandGateway.Builder
List
of MessageDispatchInterceptor
s for CommandMessage
s.
Are invoked when a command is being dispatched.dispatchInterceptors
in class AbstractCommandGateway.Builder
dispatchInterceptors
- which are invoked when a command is being dispatchedpublic DefaultCommandGateway.Builder dispatchInterceptors(List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors)
AbstractCommandGateway.Builder
List
of MessageDispatchInterceptor
s for CommandMessage
s.
Are invoked when a command is being dispatched.dispatchInterceptors
in class AbstractCommandGateway.Builder
dispatchInterceptors
- which are invoked when a command is being dispatchedpublic DefaultCommandGateway build()
DefaultCommandGateway
as specified through this Builder.DefaultCommandGateway
as specified through this BuilderCopyright © 2010–2022. All rights reserved.