Interface EventDeliveryExceptionHandler
-
- All Known Implementing Classes:
FailEventDeliveryExceptionHandler,IgnoreEventDeliveryExceptionHandler,RetryEventDeliveryExceptionHandler
public interface EventDeliveryExceptionHandlerAsynchronous handler for an exception thrown by an event handler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandle(EventDeliveryExceptionHandlerState state, java.lang.Throwable t, java.lang.Runnable retry, java.util.function.Consumer<java.lang.Throwable> fail, java.lang.Runnable ignore)handle an exception by either (asynchronously) retrying or failingbooleanhandles(java.lang.Throwable t)Returns true if this handles the throwableEventDeliveryExceptionHandlerStatemakeState(java.lang.Throwable t)create the state used for handling an exception
-
-
-
Method Detail
-
handles
boolean handles(java.lang.Throwable t)
Returns true if this handles the throwable- Parameters:
t- the throwable- Returns:
- true if handled, false otherwise
-
makeState
EventDeliveryExceptionHandlerState makeState(java.lang.Throwable t)
create the state used for handling an exception- Parameters:
t- the throwable- Returns:
- the state used by the handler
-
handle
void handle(EventDeliveryExceptionHandlerState state, java.lang.Throwable t, java.lang.Runnable retry, java.util.function.Consumer<java.lang.Throwable> fail, java.lang.Runnable ignore)
handle an exception by either (asynchronously) retrying or failing- Parameters:
state- the statet- the throwableretry- invoked asynchronously to retryfail- invoked asynchronously to failignore- invoked to ignore the exception
-
-