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 AnnotationSource
EMPTYFields inherited from interface RouteInfo
DEFAULT_PRODUCES -
Method Summary
Modifier and TypeMethodDescriptiondefault String@Nullable IntegergetPort()default booleanMatch this route within the given URI and produce aRouteMatchif a match is found.default Optional<UriRouteMatch<T, R>> Match this route within the given URI and produce aRouteMatchif a match is found.@Nullable UriRouteMatch<T, R> Match this route within the given URI and produce aRouteMatchif a match is found.default @Nullable UriRouteMatch<T, R> Match this route within the given URI and produce aRouteMatchif a match is found.Methods inherited from interface AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface Comparable
compareToMethods inherited from interface MethodBasedRouteInfo
getArgumentNames, getTargetMethod, resolveArgumentBindersMethods inherited from interface RequestMatcher
matchingMethods inherited from interface RouteInfo
consumesAll, doesConsume, doesProduce, doesProduce, explicitlyConsumes, explicitlyProduces, findStatus, getBodyArgument, getBodyType, getConsumes, getDeclaringType, getExecutor, 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
-
getHttpMethod
HttpMethod getHttpMethod()- Returns:
- The HTTP method for this route
-
getUriMatchTemplate
UriMatchTemplate getUriMatchTemplate()- Returns:
- The
UriMatchTemplateused to match URIs
-
match
Match this route within the given URI and produce aRouteMatchif a match is found.- Specified by:
matchin interfaceUriMatcher- Parameters:
uri- The URI- Returns:
- An
OptionalofRouteMatch
-
tryMatch
Match this route within the given URI and produce aRouteMatchif a match is found.- Parameters:
uri- The URI- Returns:
- A null or a
RouteMatch
-
match
Match this route within the given URI and produce aRouteMatchif a match is found.- Specified by:
matchin interfaceUriMatcher- Parameters:
uri- The URI- Returns:
- An
OptionalofRouteMatch
-
tryMatch
Match this route within the given URI and produce aRouteMatchif a match is found.- Parameters:
uri- The URI- Returns:
- A null or a
RouteMatch
-
getPort
@Nullable Integer 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.
-
isImplicitHead
default boolean isImplicitHead()Whether this route is an implicitHEADroute; that is, aHEADroute that was derived automatically from aGetmapping rather than declared by the user withHead.Implicit routes are fully-fledged routes and participate in matching and content negotiation exactly like any other route. The distinction is only used as a last-resort tie-break: if a request cannot be resolved to a single route and the remaining candidates contain both implicit and explicitly declared routes, the explicitly declared ones win instead of the request being rejected as ambiguous.
- Returns:
trueif this route was derived from a@Getmapping rather than declared- Since:
- 5.2.0
-