Package io.micronaut.web.router
Interface StatusRouteInfo<T,R>
- Type Parameters:
T
- The targetR
- The result
- All Superinterfaces:
AnnotationMetadataProvider
,AnnotationSource
,MethodBasedRouteInfo<T,
,R> RequestMatcher
,RouteInfo<R>
- All Known Implementing Classes:
DefaultStatusRouteInfo
Represents a
RouteInfo
that matches a status.- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
Fields inherited from interface io.micronaut.web.router.RouteInfo
DEFAULT_PRODUCES
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<RouteMatch<R>>
match
(int statusCode) Match the given HTTP status.match
(HttpStatus status) Match the given HTTP status.default Optional<RouteMatch<R>>
Match the given HTTP status.match
(Class<?> originatingClass, HttpStatus status) Match the given HTTP status.status()
default int
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
Methods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
Methods inherited from interface io.micronaut.web.router.MethodBasedRouteInfo
getArgumentNames, getTargetMethod, resolveArgumentBinders
Methods inherited from interface io.micronaut.web.router.RequestMatcher
matching
Methods inherited from interface io.micronaut.web.router.RouteInfo
consumesAll, doesConsume, doesProduce, doesProduce, explicitlyConsumes, explicitlyProduces, findStatus, getBodyArgument, getBodyType, getConsumes, getDeclaringType, getExecutor, getFullRequestBodyType, getMessageBodyReader, getMessageBodyWriter, getProduces, getRequestBodyType, getResponseBodyType, getReturnType, isAsync, isAsyncOrReactive, isCompletable, isErrorRoute, isImperative, isPermitsRequestBody, isReactive, isResponseBodyJsonFormattable, isSingleResult, isSpecifiedSingle, isSuspended, isVoid, isWebSocketRoute, needsRequestBody, producesAll
-
Method Details
-
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
-
match
Match the given HTTP status.- Parameters:
status
- The status to match- Returns:
- The route match
-
match
Match the given HTTP status.- Parameters:
statusCode
- The status to match- Returns:
- The route match
-
match
Match the given HTTP status.- Parameters:
originatingClass
- The class where the error originates fromstatus
- The status to match- Returns:
- The route match
-
match
Match the given HTTP status.- Parameters:
originatingClass
- The class where the error originates fromstatusCode
- The status to match- Returns:
- The route match
-