R
- The type of return value expected by the callbackC
- The type of payload of the dispatched commandpublic class RetryingCallback<C,R> extends Object implements CommandCallback<C,R>
DefaultCommandGateway
Constructor and Description |
---|
RetryingCallback(CommandCallback<C,R> delegate,
RetryScheduler retryScheduler,
CommandBus commandBus)
Initialize the RetryingCallback with the given
delegate , representing the actual callback passed as
a parameter to dispatch, the given commandMessage , retryScheduler and
commandBus . |
Modifier and Type | Method and Description |
---|---|
void |
onResult(CommandMessage<? extends C> commandMessage,
CommandResultMessage<? extends R> commandResultMessage)
Invoked when command handling execution is completed.
|
public RetryingCallback(CommandCallback<C,R> delegate, RetryScheduler retryScheduler, CommandBus commandBus)
delegate
, representing the actual callback passed as
a parameter to dispatch, the given commandMessage
, retryScheduler
and
commandBus
.delegate
- The callback to invoke when the command succeeds, or when retries are rejected.retryScheduler
- The scheduler that decides if and when a retry should be scheduledcommandBus
- The commandBus on which the command must be dispatchedpublic void onResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage)
CommandCallback
onResult
in interface CommandCallback<C,R>
commandMessage
- the CommandMessage
that was dispatchedcommandResultMessage
- the CommandResultMessage
of the command handling executionCopyright © 2010–2019. All rights reserved.