Class ExceptionHandler.Builder

  • Enclosing class:
    ExceptionHandler

    public static class ExceptionHandler.Builder
    extends Object
    ExceptionHandler builder.
    • 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.