| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.saga.annotation.RetryingErrorHandler
public class RetryingErrorHandler
ErrorHandler implementation that retries Events on non-transient exceptions.
| Nested Class Summary | |
|---|---|
static class | 
RetryingErrorHandler.TimeoutConfiguration
Definition of a timeout to use for a specific range of retries  | 
| Constructor Summary | |
|---|---|
RetryingErrorHandler()
Initialize an instance of the RetryingErrorHandler that indefinitely retries each 2 seconds.  | 
|
RetryingErrorHandler(RetryingErrorHandler.TimeoutConfiguration... timeoutConfigurations)
Initialize an instance of the RetryingErrorHandler that uses the given TimeoutConfigurations that
 describe which retry timeout should be used for each number of retries. | 
|
| Method Summary | |
|---|---|
protected  boolean | 
isTransient(Throwable exception)
Indicates whether the given exception is transient (i.e. | 
 RetryPolicy | 
onErrorInvoking(Saga saga,
                EventMessage publishedEvent,
                int invocationCount,
                Exception e)
Invoked when an error occurs when a Saga instance is invoked.  | 
 RetryPolicy | 
onErrorPreparing(Class<? extends Saga> sagaType,
                 EventMessage<?> publishedEvent,
                 int invocationCount,
                 Exception e)
Invoked when an error occurs preparing Sagas.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public RetryingErrorHandler()
public RetryingErrorHandler(RetryingErrorHandler.TimeoutConfiguration... timeoutConfigurations)
TimeoutConfigurations that
 describe which retry timeout should be used for each number of retries.
timeoutConfigurations - The definitions of the timeouts to apply to each retry| Method Detail | 
|---|
public RetryPolicy onErrorPreparing(Class<? extends Saga> sagaType,
                                    EventMessage<?> publishedEvent,
                                    int invocationCount,
                                    Exception e)
ErrorHandler
onErrorPreparing in interface ErrorHandlersagaType - The type of Saga to preparepublishedEvent - The event being publishedinvocationCount - The number of attempts to prepare (is always at least 1)e - The exception that occurred in this attempt
public RetryPolicy onErrorInvoking(Saga saga,
                                   EventMessage publishedEvent,
                                   int invocationCount,
                                   Exception e)
ErrorHandler
onErrorInvoking in interface ErrorHandlersaga - The Saga instance being invokedpublishedEvent - The event handled by the SagainvocationCount - The number of times this event has been offered to the Saga, including the last, failed,
                        attempte - The exception that occurred in the last attempt to invoke the Saga
protected boolean isTransient(Throwable exception)
exception is transient (i.e. could produce a different result when
 retried). Exceptions that are non-transient will not be eligible for a retry.
 
 This implementation will check if the exception or one of its causes is an instance of AxonNonTransientException.
exception - The exception to inspect
true if the exception is transient, otherwise false.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||