Package io.micronaut.web.router
Interface UriRouteInfo<T,R>
- Type Parameters:
T
- The targetR
- The result
- All Superinterfaces:
AnnotationMetadataProvider
,AnnotationSource
,Comparable<UriRouteInfo<T,
,R>> MethodBasedRouteInfo<T,
,R> RequestMatcher
,RouteInfo<R>
,UriMatcher
- All Known Implementing Classes:
DefaultUrlRouteInfo
public interface UriRouteInfo<T,R>
extends MethodBasedRouteInfo<T,R>, RequestMatcher, UriMatcher, Comparable<UriRouteInfo<T,R>>
- 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 String
getPort()
Match this route within the given URI and produce aRouteMatch
if a match is found.default Optional<UriRouteMatch<T,
R>> Match this route within the given URI and produce aRouteMatch
if a match is found.Match this route within the given URI and produce aRouteMatch
if a match is found.default @Nullable UriRouteMatch<T,
R> Match this route within the given URI and produce aRouteMatch
if a match is found.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 java.lang.Comparable
compareTo
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
doesConsume, doesProduce, doesProduce, explicitlyConsumes, explicitlyProduces, findStatus, getBodyArgument, getBodyType, getConsumes, getDeclaringType, getExecutor, getFullRequestBodyType, getMessageBodyReader, getMessageBodyWriter, getProduces, getRequestBodyType, getResponseBodyType, getReturnType, isAsync, isAsyncOrReactive, isCompletable, isErrorRoute, isPermitsRequestBody, isReactive, isResponseBodyJsonFormattable, isSingleResult, isSpecifiedSingle, isSuspended, isVoid, isWebSocketRoute, needsRequestBody
-
Method Details
-
getHttpMethod
HttpMethod getHttpMethod()- Returns:
- The HTTP method for this route
-
getUriMatchTemplate
UriMatchTemplate getUriMatchTemplate()- Returns:
- The
UriMatchTemplate
used to match URIs
-
match
Match this route within the given URI and produce aRouteMatch
if a match is found.- Specified by:
match
in interfaceUriMatcher
- Parameters:
uri
- The URI The URI- Returns:
- An
Optional
ofRouteMatch
-
tryMatch
Match this route within the given URI and produce aRouteMatch
if a match is found.- Parameters:
uri
- The URI The URI- Returns:
- A null or a
RouteMatch
-
match
Match this route within the given URI and produce aRouteMatch
if a match is found.- Specified by:
match
in interfaceUriMatcher
- Parameters:
uri
- The URI- Returns:
- An
Optional
ofRouteMatch
-
tryMatch
Match this route within the given URI and produce aRouteMatch
if a match is found.- Parameters:
uri
- The URI- Returns:
- A null or a
RouteMatch
-
getPort
- Returns:
- The port the route listens to, or null if the default port
-
getHttpMethodName
- Returns:
- The http method. Is equal to
getHttpMethod()
value for standard http methods.
-