Package io.micronaut.web.router
Interface UriRoute
- All Superinterfaces:
Comparable<UriRoute>,Route
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface io.micronaut.web.router.Route
DEFAULT_PRODUCES -
Method Summary
Modifier and TypeMethodDescriptionThe name of the argument to the route that is the request body.Applies the given accepted media type the route.Accept allMediaTypereferences.exposedPort(int port) The exposed port that the route applies to.default StringgetPort()Defines routes nested within this route.Applies the given accepted media type the route.where(Predicate<HttpRequest<?>> condition) Match thisRouteonly if the given predicate is true.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface io.micronaut.web.router.Route
body, getConsumes, getProduces
-
Method Details
-
toRouteInfo
UriRouteInfo<Object,Object> toRouteInfo()- Specified by:
toRouteInfoin interfaceRoute
-
nest
Defines routes nested within this route. -
getHttpMethod
HttpMethod getHttpMethod()- Returns:
- The HTTP method for this route
-
getUriMatchTemplate
UriMatchTemplate getUriMatchTemplate()- Returns:
- The
UriMatchTemplateused to match URIs
-
consumes
Description copied from interface:RouteApplies the given accepted media type the route. -
produces
Description copied from interface:RouteApplies the given accepted media type the route. -
consumesAll
UriRoute consumesAll()Description copied from interface:RouteAccept allMediaTypereferences.- Specified by:
consumesAllin interfaceRoute- Returns:
- A new route with the media type applied
-
where
Description copied from interface:RouteMatch thisRouteonly if the given predicate is true.- Specified by:
wherein interfaceRoute- Parameters:
condition- The condition which accepts aHttpRequest- Returns:
- This route
-
body
Description copied from interface:RouteThe name of the argument to the route that is the request body. -
exposedPort
The exposed port that the route applies to.- Parameters:
port- The port- Returns:
- The route
-
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.
-