Class ExceptionHandler.Builder (2.12.0)

public static class ExceptionHandler.Builder

ExceptionHandler builder.

Inheritance

java.lang.Object > ExceptionHandler.Builder

Methods

abortOn(Class<? extends Exception>[] exceptions)

public final ExceptionHandler.Builder abortOn(Class<? extends Exception>[] exceptions)

Adds the exceptions to abort on.

Parameter
NameDescription
exceptionsClass<? extends java.lang.Exception>[]

retry should abort when such exceptions are thrown

Returns
TypeDescription
ExceptionHandler.Builder

the Builder for chaining

addInterceptors(ExceptionHandler.Interceptor[] interceptors)

public ExceptionHandler.Builder addInterceptors(ExceptionHandler.Interceptor[] interceptors)

Adds the exception handler interceptors. Call order will be maintained.

Parameter
NameDescription
interceptorsInterceptor[]

the interceptors for this exception handler

Returns
TypeDescription
ExceptionHandler.Builder

the Builder for chaining

build()

public ExceptionHandler build()

Returns a new ExceptionHandler instance.

Returns
TypeDescription
ExceptionHandler

retryOn(Class<? extends Exception>[] exceptions)

public final ExceptionHandler.Builder retryOn(Class<? extends Exception>[] exceptions)

Add the exceptions to ignore/retry-on.

Parameter
NameDescription
exceptionsClass<? extends java.lang.Exception>[]

retry should continue when such exceptions are thrown

Returns
TypeDescription
ExceptionHandler.Builder

the Builder for chaining