public interface StatusRoute extends MethodBasedRoute
Route
that matches a status.DEFAULT_PRODUCES
Modifier and Type | Method and Description |
---|---|
StatusRoute |
consumes(MediaType... mediaType)
Applies the given accepted media type the route.
|
<T> Optional<RouteMatch<T>> |
match(Class originatingClass,
HttpStatus status)
Match the given HTTP status.
|
<T> Optional<RouteMatch<T>> |
match(HttpStatus status)
Match the given HTTP status.
|
StatusRoute |
nest(Runnable nested)
Defines routes nested within this route.
|
Class<?> |
originatingType() |
HttpStatus |
status() |
StatusRoute |
where(Predicate<HttpRequest<?>> condition)
Match this
Route only if the given predicate is true. |
getTargetMethod
body, body, consumesAll, getConsumes, getProduces, produces
@Nullable Class<?> originatingType()
HttpStatus status()
<T> Optional<RouteMatch<T>> match(HttpStatus status)
T
- The matched routestatus
- The status to match<T> Optional<RouteMatch<T>> match(Class originatingClass, HttpStatus status)
T
- The matched routeoriginatingClass
- The class where the error originates fromstatus
- The status to matchStatusRoute consumes(MediaType... mediaType)
Route
StatusRoute nest(Runnable nested)
Route
StatusRoute where(Predicate<HttpRequest<?>> condition)
Route
Route
only if the given predicate is true.where
in interface Route
condition
- The condition which accepts a HttpRequest