Package io.micronaut.web.router
Class DefaultRequestMatcher<T,R> 
java.lang.Object
io.micronaut.web.router.DefaultRouteInfo<R>
io.micronaut.web.router.DefaultRequestMatcher<T,R> 
- Type Parameters:
- T- The target
- R- The result
- All Implemented Interfaces:
- AnnotationMetadataProvider,- AnnotationSource,- MethodBasedRouteInfo<T,,- R> - RequestMatcher,- RouteInfo<R>
- Direct Known Subclasses:
- DefaultErrorRouteInfo,- DefaultStatusRouteInfo,- DefaultUrlRouteInfo
@Internal
public sealed class DefaultRequestMatcher<T,R> 
extends DefaultRouteInfo<R>
implements RequestMatcher
permits DefaultErrorRouteInfo<T,R>, DefaultStatusRouteInfo<T,R>, DefaultUrlRouteInfo<T,R>   
The default 
RequestMatcher 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 SummaryConstructorsConstructorDescriptionDefaultRequestMatcher(MethodExecutionHandle<T, R> targetMethod, Argument<?> bodyArgument, String bodyArgumentName, List<MediaType> producesMediaTypes, List<MediaType> consumesMediaTypes, boolean isPermitsBody, boolean isErrorRoute, List<Predicate<HttpRequest<?>>> predicates, MessageBodyHandlerRegistry messageBodyHandlerRegistry) 
- 
Method SummaryModifier and TypeMethodDescriptionString[]LikeRouteInfo.getRequestBodyType(), but excludes body arguments that may match only a part of the body (i.e.final MessageBodyReader<?>booleanisVoid()booleanmatching(HttpRequest<?> httpRequest) Match the given request.booleanresolveArgumentBinders(RequestBinderRegistry requestBinderRegistry) Methods inherited from class io.micronaut.web.router.DefaultRouteInfoconsumesAll, doesConsume, doesProduce, doesProduce, explicitlyConsumes, explicitlyProduces, findStatus, 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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.RouteInfoconsumesAll, doesConsume, doesProduce, doesProduce, explicitlyConsumes, explicitlyProduces, findStatus, getBodyArgument, getBodyType, getConsumes, getDeclaringType, getExecutor, getMessageBodyWriter, getProduces, getResponseBodyType, getReturnType, isAsync, isAsyncOrReactive, isCompletable, isErrorRoute, isImperative, isPermitsRequestBody, isReactive, isResponseBodyJsonFormattable, isSingleResult, isSpecifiedSingle, isSuspended, isWebSocketRoute, producesAll
- 
Constructor Details- 
DefaultRequestMatcherpublic DefaultRequestMatcher(MethodExecutionHandle<T, R> targetMethod, Argument<?> bodyArgument, String bodyArgumentName, List<MediaType> producesMediaTypes, List<MediaType> consumesMediaTypes, boolean isPermitsBody, boolean isErrorRoute, List<Predicate<HttpRequest<?>>> predicates, MessageBodyHandlerRegistry messageBodyHandlerRegistry) 
 
- 
- 
Method Details- 
matchingDescription copied from interface:RequestMatcherMatch the given request.- Specified by:
- matchingin interface- RequestMatcher
- Parameters:
- httpRequest- The request
- Returns:
- true if route matches this request
 
- 
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
 
 
-