org.axonframework.saga.annotation
Class ProceedingErrorHandler
java.lang.Object
org.axonframework.saga.annotation.ProceedingErrorHandler
- All Implemented Interfaces:
- ErrorHandler
public class ProceedingErrorHandler
- extends Object
- implements ErrorHandler
ErrorHandler implementation that logs the error and proceeds with the next event.
- Since:
- 2.4.2
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProceedingErrorHandler
public ProceedingErrorHandler()
onErrorPreparing
public RetryPolicy onErrorPreparing(Class<? extends Saga> sagaType,
EventMessage<?> publishedEvent,
int invocationCount,
Exception e)
- Description copied from interface:
ErrorHandler
- Invoked when an error occurs preparing Sagas. This is the phase where sagas are looked up using their
associations.
- Specified by:
onErrorPreparing
in interface ErrorHandler
- Parameters:
sagaType
- 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
- Returns:
- the expected behavior for the event handling component
onErrorInvoking
public RetryPolicy onErrorInvoking(Saga saga,
EventMessage publishedEvent,
int invocationCount,
Exception e)
- Description copied from interface:
ErrorHandler
- Invoked when an error occurs when a Saga instance is invoked. These are errors thrown by the Saga itself.
- Specified by:
onErrorInvoking
in interface ErrorHandler
- Parameters:
saga
- 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
- Returns:
- The Policy describing what the SagaManager should do with this exception (retry, skip, etc)
Copyright © 2010-2016. All Rights Reserved.