|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.commandhandling.gateway.RetryingCallback<R>
R
- The type of return value expected by the callbackpublic class RetryingCallback<R>
Callback implementation that will invoke a retry scheduler if a command results in a runtime exception.
Generally, it is not necessary to use this class directly. It is used by CommandGateway implementations to support retrying of commands.
DefaultCommandGateway
Constructor Summary | |
---|---|
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 . |
Method Summary | |
---|---|
void |
onFailure(Throwable cause)
Invoked when command handling execution resulted in an error. |
void |
onSuccess(R result)
Invoked when command handling execution was successful. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 dispatchedMethod Detail |
---|
public void onSuccess(R result)
CommandCallback
onSuccess
in interface CommandCallback<R>
result
- The result of the command handling execution, if any.public void onFailure(Throwable cause)
CommandCallback
onFailure
in interface CommandCallback<R>
cause
- The exception raised during command handling
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |