public interface ErrorRoute extends MethodBasedRoute
Route
that matches an exception.DEFAULT_PRODUCES
Modifier and Type | Method and Description |
---|---|
ErrorRoute |
consumes(MediaType... mediaType)
Applies the given accepted media type the route.
|
Class<? extends Throwable> |
exceptionType() |
<T> Optional<RouteMatch<T>> |
match(Class originatingClass,
Throwable exception)
Match the given exception.
|
<T> Optional<RouteMatch<T>> |
match(Throwable exception)
Match the given exception.
|
ErrorRoute |
nest(Runnable nested)
Defines routes nested within this route.
|
Class<?> |
originatingType() |
ErrorRoute |
produces(MediaType... mediaType)
Applies the given accepted media type the route.
|
ErrorRoute |
where(Predicate<HttpRequest<?>> condition)
Match this
Route only if the given predicate is true. |
getTargetMethod
body, body, consumesAll, getConsumes, getProduces
Class<?> originatingType()
<T> Optional<RouteMatch<T>> match(Throwable exception)
T
- The typeexception
- The exception to match<T> Optional<RouteMatch<T>> match(Class originatingClass, Throwable exception)
T
- The typeoriginatingClass
- The class where the error originates fromexception
- The exception to matchErrorRoute consumes(MediaType... mediaType)
Route
ErrorRoute nest(Runnable nested)
Route
ErrorRoute where(Predicate<HttpRequest<?>> condition)
Route
Route
only if the given predicate is true.where
in interface Route
condition
- The condition which accepts a HttpRequest
ErrorRoute produces(MediaType... mediaType)
Route