R - The type of return value expected by the callbackpublic class RetryingCallback<R> extends Object implements CommandCallback<R>
DefaultCommandGateway| Constructor and Description |
|---|
RetryingCallback(CommandCallback<R> delegate,
CommandMessage commandMessage,
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. |
public RetryingCallback(CommandCallback<R> delegate, CommandMessage commandMessage, 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.commandMessage - The message being dispatchedretryScheduler - The scheduler that decides if and when a retry should be scheduledcommandBus - The commandBus on which the command must be dispatchedpublic void onSuccess(R result)
CommandCallbackonSuccess in interface CommandCallback<R>result - The result of the command handling execution, if any.public void onFailure(Throwable cause)
CommandCallbackonFailure in interface CommandCallback<R>cause - The exception raised during command handlingCopyright © 2010-2014. All Rights Reserved.