Interface BeanExceptionHandler<T,E extends Throwable>

Type Parameters:
T - The bean type
E - And the exception
All Superinterfaces:
BiConsumer<T,E>
All Known Subinterfaces:
TaskExceptionHandler<T,E>
All Known Implementing Classes:
DefaultTaskExceptionHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BeanExceptionHandler<T,E extends Throwable> extends BiConsumer<T,E>
An exception handler capable of receiving a bean that originated the exception and an exception type.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(T bean, E throwable)
    Handles the exception.
    void
    handle(T bean, E throwable)
    Handles the exception.

    Methods inherited from interface java.util.function.BiConsumer

    andThen
  • Method Details

    • handle

      void handle(@Nullable T bean, @NonNull E throwable)
      Handles the exception.
      Parameters:
      bean - The bean
      throwable - The error
    • accept

      default void accept(@Nullable T bean, @NonNull E throwable)
      Handles the exception.
      Specified by:
      accept in interface BiConsumer<T,E extends Throwable>
      Parameters:
      bean - The bean
      throwable - The error