Class RetryingCallback<C,R>

java.lang.Object
org.axonframework.commandhandling.gateway.RetryingCallback<C,R>
Type Parameters:
C - The type of payload of the dispatched command
R - The type of return value expected by the callback
All Implemented Interfaces:
CommandCallback<C,R>

public class RetryingCallback<C,R> extends Object implements CommandCallback<C,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.

Since:
2.0
Author:
Allard Buijze
See Also:
  • Constructor Details

    • RetryingCallback

      public 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.
      Parameters:
      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 scheduled
      commandBus - The commandBus on which the command must be dispatched
  • Method Details