Package io.micronaut.web.router
Interface StatusRoute
- All Superinterfaces:
Route
Represents a
Route that matches a status.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface io.micronaut.web.router.Route
DEFAULT_PRODUCES -
Method Summary
Modifier and TypeMethodDescriptionApplies the given accepted media type the route.Defines routes nested within this route.status()default intwhere(Predicate<HttpRequest<?>> condition) Match thisRouteonly if the given predicate is true.Methods inherited from interface io.micronaut.web.router.Route
body, body, consumesAll, getConsumes, getProduces, produces
-
Method Details
-
toRouteInfo
StatusRouteInfo<Object,Object> toRouteInfo()- Specified by:
toRouteInfoin interfaceRoute
-
originatingType
- Returns:
- The type the exception originates from. Null if the error route is global.
-
status
HttpStatus status()- Returns:
- The status
-
statusCode
default int statusCode()- Returns:
- The status
-
consumes
Description copied from interface:RouteApplies the given accepted media type the route. -
nest
Description copied from interface:RouteDefines routes nested within this route. -
where
Description copied from interface:RouteMatch thisRouteonly if the given predicate is true.- Specified by:
wherein interfaceRoute- Parameters:
condition- The condition which accepts aHttpRequest- Returns:
- This route
-