Package com.google.cloud
Class ExceptionHandler.Builder
- java.lang.Object
-
- com.google.cloud.ExceptionHandler.Builder
-
- Enclosing class:
- ExceptionHandler
public static class ExceptionHandler.Builder extends Object
ExceptionHandler builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExceptionHandler.Builder
abortOn(Class<? extends Exception>... exceptions)
Adds the exceptions to abort on.ExceptionHandler.Builder
addInterceptors(ExceptionHandler.Interceptor... interceptors)
Adds the exception handler interceptors.ExceptionHandler
build()
Returns a new ExceptionHandler instance.ExceptionHandler.Builder
retryOn(Class<? extends Exception>... exceptions)
Add the exceptions to ignore/retry-on.
-
-
-
Method Detail
-
addInterceptors
public ExceptionHandler.Builder addInterceptors(ExceptionHandler.Interceptor... interceptors)
Adds the exception handler interceptors. Call order will be maintained.- Parameters:
interceptors
- the interceptors for this exception handler- Returns:
- the Builder for chaining
-
retryOn
@SafeVarargs public final ExceptionHandler.Builder retryOn(Class<? extends Exception>... exceptions)
Add the exceptions to ignore/retry-on.- Parameters:
exceptions
- retry should continue when such exceptions are thrown- Returns:
- the Builder for chaining
-
abortOn
@SafeVarargs public final ExceptionHandler.Builder abortOn(Class<? extends Exception>... exceptions)
Adds the exceptions to abort on.- Parameters:
exceptions
- retry should abort when such exceptions are thrown- Returns:
- the Builder for chaining
-
build
public ExceptionHandler build()
Returns a new ExceptionHandler instance.
-
-