Package io.micronaut.web.router
Class DefaultStatusRouteInfo<T,R> 
java.lang.Object
io.micronaut.web.router.DefaultRouteInfo<R>
io.micronaut.web.router.DefaultRequestMatcher<T,R>
 
io.micronaut.web.router.DefaultStatusRouteInfo<T,R> 
- Type Parameters:
- T- The target
- R- The result
- All Implemented Interfaces:
- AnnotationMetadataProvider,- AnnotationSource,- MethodBasedRouteInfo<T,,- R> - RequestMatcher,- RouteInfo<R>,- StatusRouteInfo<T,- R> 
@Internal
public final class DefaultStatusRouteInfo<T,R> 
extends DefaultRequestMatcher<T,R>
implements StatusRouteInfo<T,R>  
The default 
StatusRouteInfo implementation.- Since:
- 4.0.0
- Author:
- Denis Stepanov
- 
Field SummaryFields inherited from class io.micronaut.web.router.DefaultRouteInfoannotationMetadata, consumesMediaTypes, consumesMediaTypesContainsAll, declaringType, definedStatus, isWebSocketRoute, producesMediaTypes, producesMediaTypesContainsAll, returnTypeFields inherited from interface io.micronaut.core.annotation.AnnotationSourceEMPTYFields inherited from interface io.micronaut.web.router.RouteInfoDEFAULT_PRODUCES
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultStatusRouteInfo(Class<?> originatingType, int statusCode, MethodExecutionHandle<T, R> targetMethod, @Nullable String bodyArgumentName, @Nullable Argument<?> bodyArgument, List<MediaType> consumesMediaTypes, List<MediaType> producesMediaTypes, List<Predicate<HttpRequest<?>>> predicates, ConversionService conversionService, MessageBodyHandlerRegistry messageBodyHandlerRegistry) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanfindStatus(HttpStatus defaultStatus) Finds predefined route http status or uses default.String[]LikeRouteInfo.getRequestBodyType(), but excludes body arguments that may match only a part of the body (i.e.final MessageBodyReader<?>inthashCode()booleanisVoid()match(int statusCode) Match the given HTTP status.match(HttpStatus status) Match the given HTTP status.Match the given HTTP status.match(Class<?> originatingClass, HttpStatus status) Match the given HTTP status.booleanClass<?>resolveArgumentBinders(RequestBinderRegistry requestBinderRegistry) status()inttoString()Methods inherited from class io.micronaut.web.router.DefaultRequestMatchermatchingMethods inherited from class io.micronaut.web.router.DefaultRouteInfoconsumesAll, doesConsume, doesProduce, doesProduce, explicitlyConsumes, explicitlyProduces, getAnnotationMetadata, getConsumes, getDeclaringType, getExecutor, getMessageBodyWriter, getProduces, getResponseBodyType, getReturnType, isAsync, isAsyncOrReactive, isCompletable, isErrorRoute, isImperative, isPermitsRequestBody, isReactive, isSingleResult, isSpecifiedSingle, isSuspended, isWebSocketRoute, producesAllMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProviderfindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSourcegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.web.router.MethodBasedRouteInfogetArgumentNames, getTargetMethod, resolveArgumentBindersMethods inherited from interface io.micronaut.web.router.RequestMatchermatchingMethods inherited from interface io.micronaut.web.router.RouteInfoconsumesAll, doesConsume, doesProduce, doesProduce, explicitlyConsumes, explicitlyProduces, 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
- 
Constructor Details- 
DefaultStatusRouteInfopublic DefaultStatusRouteInfo(Class<?> originatingType, int statusCode, MethodExecutionHandle<T, R> targetMethod, @Nullable @Nullable String bodyArgumentName, @Nullable @Nullable Argument<?> bodyArgument, List<MediaType> consumesMediaTypes, List<MediaType> producesMediaTypes, List<Predicate<HttpRequest<?>>> predicates, ConversionService conversionService, MessageBodyHandlerRegistry messageBodyHandlerRegistry) 
 
- 
- 
Method Details- 
originatingType- Specified by:
- originatingTypein interface- StatusRouteInfo<T,- R> 
- Returns:
- The type the exception originates from. Null if the error route is global.
 
- 
status- Specified by:
- statusin interface- StatusRouteInfo<T,- R> 
- Returns:
- The status
 
- 
statusCodepublic int statusCode()- Specified by:
- statusCodein interface- StatusRouteInfo<T,- R> 
- Returns:
- The status
 
- 
findStatusDescription copied from interface:RouteInfoFinds predefined route http status or uses default.- Specified by:
- findStatusin interface- RouteInfo<T>
- Overrides:
- findStatusin class- DefaultRouteInfo<R>
- Parameters:
- defaultStatus- The default status
- Returns:
- The status
 
- 
matchDescription copied from interface:StatusRouteInfoMatch the given HTTP status.- Specified by:
- matchin interface- StatusRouteInfo<T,- R> 
- Parameters:
- originatingClass- The class where the error originates from
- status- The status to match
- Returns:
- The route match
 
- 
matchDescription copied from interface:StatusRouteInfoMatch the given HTTP status.- Specified by:
- matchin interface- StatusRouteInfo<T,- R> 
- Parameters:
- status- The status to match
- Returns:
- The route match
 
- 
matchDescription copied from interface:StatusRouteInfoMatch the given HTTP status.- Specified by:
- matchin interface- StatusRouteInfo<T,- R> 
- Parameters:
- statusCode- The status to match
- Returns:
- The route match
 
- 
matchDescription copied from interface:StatusRouteInfoMatch the given HTTP status.- Specified by:
- matchin interface- StatusRouteInfo<T,- R> 
- Parameters:
- originatingClass- The class where the error originates from
- statusCode- The status to match
- Returns:
- The route match
 
- 
hashCodepublic int hashCode()
- 
equals
- 
toString
- 
getMessageBodyReader- Specified by:
- getMessageBodyReaderin interface- RouteInfo<T>
- Returns:
- The message body reader. if any.
 
- 
resolveArgumentBinderspublic RequestArgumentBinder<Object>[] resolveArgumentBinders(RequestBinderRegistry requestBinderRegistry) - Specified by:
- resolveArgumentBindersin interface- MethodBasedRouteInfo<T,- R> 
 
- 
isVoidpublic boolean isVoid()- Specified by:
- isVoidin interface- RouteInfo<T>
- Overrides:
- isVoidin class- DefaultRouteInfo<R>
- Returns:
- Does the route return void
 
- 
getTargetMethod- Specified by:
- getTargetMethodin interface- MethodBasedRouteInfo<T,- R> 
- Returns:
- The MethodExecutionHandle
 
- 
getRequestBodyType- Specified by:
- getRequestBodyTypein interface- RouteInfo<T>
- Overrides:
- getRequestBodyTypein class- DefaultRouteInfo<R>
- Returns:
- The argument that represents the body of the request
 
- 
getFullRequestBodyTypeDescription copied from interface:RouteInfoLikeRouteInfo.getRequestBodyType(), but excludes body arguments that may match only a part of the body (i.e. that have no@Bodyannotation, or where the@Bodyhas a value set).- Specified by:
- getFullRequestBodyTypein interface- RouteInfo<T>
- Returns:
- The argument that represents the body
 
- 
getArgumentNames- Specified by:
- getArgumentNamesin interface- MethodBasedRouteInfo<T,- R> 
 
- 
needsRequestBodypublic boolean needsRequestBody()- Specified by:
- needsRequestBodyin interface- RouteInfo<T>
- Overrides:
- needsRequestBodyin class- DefaultRouteInfo<R>
- Returns:
- true if the route needs request body to be read
 
 
-