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> java.util.Optional<RouteMatch<T>> |
match(java.lang.Class originatingClass,
HttpStatus status)
Match the given HTTP status.
|
<T> java.util.Optional<RouteMatch<T>> |
match(HttpStatus status)
Match the given HTTP status.
|
StatusRoute |
nest(java.lang.Runnable nested)
Defines routes nested within this route.
|
java.lang.Class<?> |
originatingType() |
HttpStatus |
status() |
StatusRoute |
where(java.util.function.Predicate<HttpRequest<?>> condition)
Match this
Route only if the given predicate is true. |
getTargetMethod
acceptAll, body, body, consumesAll, getConsumes, getProduces, produces
@Nullable java.lang.Class<?> originatingType()
HttpStatus status()
<T> java.util.Optional<RouteMatch<T>> match(HttpStatus status)
T
- The matched routestatus
- The status to match<T> java.util.Optional<RouteMatch<T>> match(java.lang.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(java.lang.Runnable nested)
Route
StatusRoute where(java.util.function.Predicate<HttpRequest<?>> condition)
Route
Route
only if the given predicate is true.where
in interface Route
condition
- The condition which accepts a HttpRequest