public static class ExceptionHandler.Builder
ExceptionHandler builder.
Methods
abortOn(Class<? extends Exception>[] exceptions)
public final ExceptionHandler.Builder abortOn(Class<? extends Exception>[] exceptions)
Adds the exceptions to abort on.
Parameter | |
---|---|
Name | Description |
exceptions | Class<? extends java.lang.Exception>[] retry should abort when such exceptions are thrown |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
interceptors | Interceptor[] the interceptors for this exception handler |
Returns | |
---|---|
Type | Description |
ExceptionHandler.Builder | the Builder for chaining |
build()
public ExceptionHandler build()
Returns a new ExceptionHandler instance.
Returns | |
---|---|
Type | Description |
ExceptionHandler |
retryOn(Class<? extends Exception>[] exceptions)
public final ExceptionHandler.Builder retryOn(Class<? extends Exception>[] exceptions)
Add the exceptions to ignore/retry-on.
Parameter | |
---|---|
Name | Description |
exceptions | Class<? extends java.lang.Exception>[] retry should continue when such exceptions are thrown |
Returns | |
---|---|
Type | Description |
ExceptionHandler.Builder | the Builder for chaining |