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 allMediaType
references.exposedPort
(int port) The exposed port that the route applies to.default String
getPort()
Defines routes nested within this route.Applies the given accepted media type the route.where
(Predicate<HttpRequest<?>> condition) Match thisRoute
only if the given predicate is true.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface io.micronaut.web.router.Route
body, getConsumes, getProduces
-
Method Details
-
toRouteInfo
UriRouteInfo<Object,Object> toRouteInfo()- Specified by:
toRouteInfo
in interfaceRoute
-
nest
Defines routes nested within this route. -
getHttpMethod
HttpMethod getHttpMethod()- Returns:
- The HTTP method for this route
-
getUriMatchTemplate
UriMatchTemplate getUriMatchTemplate()- Returns:
- The
UriMatchTemplate
used to match URIs
-
consumes
Description copied from interface:Route
Applies the given accepted media type the route. -
produces
Description copied from interface:Route
Applies the given accepted media type the route. -
consumesAll
UriRoute consumesAll()Description copied from interface:Route
Accept allMediaType
references.- Specified by:
consumesAll
in interfaceRoute
- Returns:
- A new route with the media type applied
-
where
Description copied from interface:Route
Match thisRoute
only if the given predicate is true.- Specified by:
where
in interfaceRoute
- Parameters:
condition
- The condition which accepts aHttpRequest
- Returns:
- This route
-
body
Description copied from interface:Route
The 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.
-