Class ExceptionHandlerRegistration.ExceptionControllerBuilder<C,T extends Throwable>
java.lang.Object
org.incendo.cloud.exception.handling.ExceptionHandlerRegistration.ExceptionControllerBuilder<C,T>
- Enclosing class:
ExceptionHandlerRegistration<C,T extends Throwable>
-
Method Summary
Modifier and TypeMethodDescription@NonNull ExceptionHandlerRegistration<C, ? extends T> build()Builds a registration from this builder.exceptionFilter(@NonNull Predicate<T> exceptionFilter) Returns a new builder with the givenexceptionFilter.exceptionHandler(@NonNull ExceptionHandler<C, ? extends T> exceptionHandler) Returns a new builder with the givenexceptionHandler.
-
Method Details
-
exceptionHandler
public @NonNull ExceptionHandlerRegistration.ExceptionControllerBuilder<C,T> exceptionHandler(@NonNull ExceptionHandler<C, ? extends T> exceptionHandler) Returns a new builder with the givenexceptionHandler.- Parameters:
exceptionHandler- the new exception handler- Returns:
- new builder instance
-
exceptionFilter
public @NonNull ExceptionHandlerRegistration.ExceptionControllerBuilder<C,T> exceptionFilter(@NonNull Predicate<T> exceptionFilter) Returns a new builder with the givenexceptionFilter.- Parameters:
exceptionFilter- the new filter, only exceptions that evaluate totruewill be handled by the handler- Returns:
- new builder instance
-
build
Builds a registration from this builder.- Returns:
- the registration
-