Class FailEventDeliveryExceptionHandler
- java.lang.Object
-
- io.eventuate.javaclient.eventhandling.exceptionhandling.FailEventDeliveryExceptionHandler
-
- All Implemented Interfaces:
EventDeliveryExceptionHandler
public class FailEventDeliveryExceptionHandler extends java.lang.Object implements EventDeliveryExceptionHandler
An exception handler that fails immediately
-
-
Constructor Summary
Constructors Constructor Description FailEventDeliveryExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete 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
public boolean handles(java.lang.Throwable t)
Description copied from interface:EventDeliveryExceptionHandlerReturns true if this handles the throwable- Specified by:
handlesin interfaceEventDeliveryExceptionHandler- Parameters:
t- the throwable- Returns:
- true if handled, false otherwise
-
makeState
public EventDeliveryExceptionHandlerState makeState(java.lang.Throwable t)
Description copied from interface:EventDeliveryExceptionHandlercreate the state used for handling an exception- Specified by:
makeStatein interfaceEventDeliveryExceptionHandler- Parameters:
t- the throwable- Returns:
- the state used by the handler
-
handle
public void handle(EventDeliveryExceptionHandlerState state, java.lang.Throwable t, java.lang.Runnable retry, java.util.function.Consumer<java.lang.Throwable> fail, java.lang.Runnable ignore)
Description copied from interface:EventDeliveryExceptionHandlerhandle an exception by either (asynchronously) retrying or failing- Specified by:
handlein interfaceEventDeliveryExceptionHandler- Parameters:
state- the statet- the throwableretry- invoked asynchronously to retryfail- invoked asynchronously to failignore- invoked to ignore the exception
-
-