Interface UriRouteInfo<T,R>

Type Parameters:
T - The target
R - The result
All Superinterfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, Comparable<UriRouteInfo<T,R>>, MethodBasedRouteInfo<T,R>, RequestMatcher, RouteInfo<R>, io.micronaut.http.uri.UriMatcher
All Known Implementing Classes:
DefaultUrlRouteInfo

public interface UriRouteInfo<T,R> extends MethodBasedRouteInfo<T,R>, RequestMatcher, io.micronaut.http.uri.UriMatcher, Comparable<UriRouteInfo<T,R>>
Represents a Route that matches a URI.
Since:
4.0.0
  • Method Details

    • getHttpMethod

      io.micronaut.http.HttpMethod getHttpMethod()
      Returns:
      The HTTP method for this route
    • getUriMatchTemplate

      io.micronaut.http.uri.UriMatchTemplate getUriMatchTemplate()
      Returns:
      The UriMatchTemplate used to match URIs
    • match

      default Optional<UriRouteMatch<T,R>> match(URI uri)
      Match this route within the given URI and produce a RouteMatch if a match is found.
      Specified by:
      match in interface io.micronaut.http.uri.UriMatcher
      Parameters:
      uri - The URI
      Returns:
      An Optional of RouteMatch
    • tryMatch

      @Nullable default @Nullable UriRouteMatch<T,R> tryMatch(@NonNull @NonNull URI uri)
      Match this route within the given URI and produce a RouteMatch if a match is found.
      Parameters:
      uri - The URI
      Returns:
      A null or a RouteMatch
    • match

      Match this route within the given URI and produce a RouteMatch if a match is found.
      Specified by:
      match in interface io.micronaut.http.uri.UriMatcher
      Parameters:
      uri - The URI
      Returns:
      An Optional of RouteMatch
    • tryMatch

      @Nullable @Nullable UriRouteMatch<T,R> tryMatch(@NonNull @NonNull String uri)
      Match this route within the given URI and produce a RouteMatch if a match is found.
      Parameters:
      uri - The URI
      Returns:
      A null or a RouteMatch
    • getPort

      @Nullable @Nullable Integer getPort()
      Returns:
      The port the route listens to, or null if the default port
    • getHttpMethodName

      default String getHttpMethodName()
      Returns:
      The http method. Is equal to getHttpMethod() value for standard http methods.