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