Class ExceptionMatcher.Builder
java.lang.Object
org.springframework.kafka.support.ExceptionMatcher.Builder
- Enclosing class:
ExceptionMatcher
Fluent API for configuring an
ExceptionMatcher
.- Since:
- 4.0
- Author:
- Stephane Nicoll, Dave Syer, Gary Russell
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd an exception type.addAll
(Collection<Class<? extends Throwable>> exceptionTypes) Add all exception types from the given collection.build()
Build anExceptionMatcher
.traverseCauses
(boolean traverseCauses) Specify if the matcher should traverse nested causes to check for the presence of a matching exception.
-
Constructor Details
-
Builder
protected Builder(boolean matchIfFound)
-
-
Method Details
-
add
Add an exception type.- Parameters:
exceptionType
- the exception type to add- Returns:
this
-
addAll
Add all exception types from the given collection.- Parameters:
exceptionTypes
- the exception types to add- Returns:
this
-
traverseCauses
Specify if the matcher should traverse nested causes to check for the presence of a matching exception.- Parameters:
traverseCauses
- whether to traverse causes- Returns:
this
-
build
-