接口 ExceptionHandler
- 所有已知实现类:
CompositeExceptionHandler
,DefaultExceptionHandler
,FootballExceptionHandler
,LogOrRethrowExceptionHandler
,RethrowOnThresholdExceptionHandler
,SimpleLimitExceptionHandler
,SimpleRetryExceptionHandler
public interface ExceptionHandler
Handler to allow strategies for re-throwing exceptions. Normally aCompletionPolicy
will be used to decide whether to end a batch when there is no exception, and theExceptionHandler
is used to signal an abnormal ending - an abnormal ending would result in anExceptionHandler
throwing an exception. The caller will catch and re-throw it if necessary.- 作者:
- Dave Syer, Robert Kasanicky
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
handleException(RepeatContext context, java.lang.Throwable throwable)
Deal with a Throwable during a batch - decide whether it should be re-thrown in the first place.
方法详细资料
handleException
void handleException(RepeatContext context, java.lang.Throwable throwable) throws java.lang.Throwable
Deal with a Throwable during a batch - decide whether it should be re-thrown in the first place.- 参数:
context
- the currentRepeatContext
. Can be used to store state (via attributes), for example to count the number of occurrences of a particular exception type and implement a threshold policy.throwable
- an exception.- 抛出:
java.lang.Throwable
- implementations are free to re-throw the exception