Class DefaultRouteBuilder
- java.lang.Object
-
- io.micronaut.web.router.DefaultRouteBuilder
-
- All Implemented Interfaces:
RouteBuilder
- Direct Known Subclasses:
AnnotatedFilterRouteBuilder,AnnotatedMethodRouteBuilder
public abstract class DefaultRouteBuilder extends java.lang.Object implements RouteBuilder
A DefaultRouteBuilder implementation for building roots.- Since:
- 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.micronaut.web.router.RouteBuilder
RouteBuilder.UriNamingStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static RouteBuilder.UriNamingStrategyCAMEL_CASE_NAMING_STRATEGYARouteBuilder.UriNamingStrategywhere by camel case conventions are used.protected io.micronaut.core.convert.ConversionService<?>conversionServiceprotected java.nio.charset.CharsetdefaultCharsetprotected io.micronaut.context.ExecutionHandleLocatorexecutionHandleLocatorprotected static org.slf4j.LoggerLOGprotected RouteBuilder.UriNamingStrategyuriNamingStrategy-
Fields inherited from interface io.micronaut.web.router.RouteBuilder
ID
-
-
Constructor Summary
Constructors Constructor Description DefaultRouteBuilder(io.micronaut.context.ExecutionHandleLocator executionHandleLocator)DefaultRouteBuilder(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, RouteBuilder.UriNamingStrategy uriNamingStrategy)DefaultRouteBuilder(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, RouteBuilder.UriNamingStrategy uriNamingStrategy, io.micronaut.core.convert.ConversionService<?> conversionService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterRouteaddFilter(java.lang.String pathPattern, io.micronaut.context.BeanLocator beanLocator, io.micronaut.inject.BeanDefinition<? extends io.micronaut.http.filter.HttpFilter> beanDefinition)Add a filter.FilterRouteaddFilter(java.lang.String pathPattern, java.util.function.Supplier<io.micronaut.http.filter.HttpFilter> filter)Add a filter.protected UriRoutebuildBeanRoute(java.lang.String httpMethodName, io.micronaut.http.HttpMethod httpMethod, java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)A special case that is required for non standard http methods.protected UriRoutebuildRoute(io.micronaut.http.HttpMethod httpMethod, java.lang.String uri, io.micronaut.inject.MethodExecutionHandle<?,java.lang.Object> executableHandle)Build a route.protected UriRoutebuildRoute(io.micronaut.http.HttpMethod httpMethod, java.lang.String uri, java.lang.Class<?> type, java.lang.String method, java.lang.Class... parameterTypes)Build a route.UriRouteDELETE(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRouteDELETE(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRouteDELETE(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.ErrorRouteerror(java.lang.Class<? extends java.lang.Throwable> error, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)Register a route to handle the error.ErrorRouteerror(java.lang.Class originatingClass, java.lang.Class<? extends java.lang.Throwable> error, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)Register a route to handle the error.UriRouteGET(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRouteGET(java.lang.String uri, java.lang.Class<?> type, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRouteGET(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.java.util.List<ErrorRoute>getErrorRoutes()java.util.Set<java.lang.Integer>getExposedPorts()java.util.List<FilterRoute>getFilterRoutes()java.util.List<StatusRoute>getStatusRoutes()RouteBuilder.UriNamingStrategygetUriNamingStrategy()java.util.List<UriRoute>getUriRoutes()UriRouteHEAD(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRouteHEAD(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRouteHEAD(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRouteOPTIONS(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRouteOPTIONS(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRouteOPTIONS(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRoutePATCH(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRoutePATCH(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRoutePATCH(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRoutePOST(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRoutePOST(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRoutePOST(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRoutePUT(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRoutePUT(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.UriRoutePUT(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)Route the specified URI template to the specified target.ResourceRouteresources(java.lang.Class cls)Builds the necessary mappings to treat the given class as a REST endpoint.ResourceRoutesingle(java.lang.Class cls)Builds the necessary mappings to treat the given class as a singular REST endpoint.StatusRoutestatus(io.micronaut.http.HttpStatus status, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)Register a route to handle the returned status code.StatusRoutestatus(java.lang.Class originatingClass, io.micronaut.http.HttpStatus status, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)Register a route to handle the returned status code.UriRouteTRACE(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)Route the specified URI template to the specified target.UriRouteTRACE(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)Route the specified URI template to the specified target.UriRouteTRACE(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class[] parameterTypes)Route the specified URI template to the specified target.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.web.router.RouteBuilder
DELETE, DELETE, DELETE, DELETE, DELETE, DELETE, error, error, error, error, GET, GET, GET, GET, GET, GET, HEAD, HEAD, HEAD, HEAD, HEAD, HEAD, OPTIONS, OPTIONS, OPTIONS, OPTIONS, OPTIONS, OPTIONS, PATCH, PATCH, PATCH, PATCH, PATCH, PATCH, POST, POST, POST, POST, POST, POST, PUT, PUT, PUT, PUT, PUT, PUT, resources, single, status, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE
-
-
-
-
Field Detail
-
CAMEL_CASE_NAMING_STRATEGY
public static final RouteBuilder.UriNamingStrategy CAMEL_CASE_NAMING_STRATEGY
ARouteBuilder.UriNamingStrategywhere by camel case conventions are used.
-
LOG
protected static final org.slf4j.Logger LOG
-
executionHandleLocator
protected final io.micronaut.context.ExecutionHandleLocator executionHandleLocator
-
uriNamingStrategy
protected final RouteBuilder.UriNamingStrategy uriNamingStrategy
-
conversionService
protected final io.micronaut.core.convert.ConversionService<?> conversionService
-
defaultCharset
protected final java.nio.charset.Charset defaultCharset
-
-
Constructor Detail
-
DefaultRouteBuilder
public DefaultRouteBuilder(io.micronaut.context.ExecutionHandleLocator executionHandleLocator)
- Parameters:
executionHandleLocator- The execution handler locator
-
DefaultRouteBuilder
public DefaultRouteBuilder(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, RouteBuilder.UriNamingStrategy uriNamingStrategy)- Parameters:
executionHandleLocator- The execution handler locatoruriNamingStrategy- The URI naming strategy
-
DefaultRouteBuilder
public DefaultRouteBuilder(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, RouteBuilder.UriNamingStrategy uriNamingStrategy, io.micronaut.core.convert.ConversionService<?> conversionService)- Parameters:
executionHandleLocator- The execution handler locatoruriNamingStrategy- The URI naming strategyconversionService- The conversion service
-
-
Method Detail
-
getExposedPorts
public java.util.Set<java.lang.Integer> getExposedPorts()
- Specified by:
getExposedPortsin interfaceRouteBuilder- Returns:
- The exposed ports
-
getFilterRoutes
public java.util.List<FilterRoute> getFilterRoutes()
- Specified by:
getFilterRoutesin interfaceRouteBuilder- Returns:
- The filter routes
-
addFilter
public FilterRoute addFilter(java.lang.String pathPattern, java.util.function.Supplier<io.micronaut.http.filter.HttpFilter> filter)
Description copied from interface:RouteBuilderAdd a filter.- Specified by:
addFilterin interfaceRouteBuilder- Parameters:
pathPattern- The path pattern for the filterfilter- The filter itself- Returns:
- The
FilterRoute
-
addFilter
public FilterRoute addFilter(java.lang.String pathPattern, io.micronaut.context.BeanLocator beanLocator, io.micronaut.inject.BeanDefinition<? extends io.micronaut.http.filter.HttpFilter> beanDefinition)
Description copied from interface:RouteBuilderAdd a filter.- Specified by:
addFilterin interfaceRouteBuilder- Parameters:
pathPattern- The path pattern for the filterbeanLocator- The bean locatorbeanDefinition- The bean definition- Returns:
- The
FilterRoute
-
getStatusRoutes
public java.util.List<StatusRoute> getStatusRoutes()
- Specified by:
getStatusRoutesin interfaceRouteBuilder- Returns:
- Obtain a list of constructed routes
-
getErrorRoutes
public java.util.List<ErrorRoute> getErrorRoutes()
- Specified by:
getErrorRoutesin interfaceRouteBuilder- Returns:
- Obtain a list of constructed routes
-
getUriRoutes
public java.util.List<UriRoute> getUriRoutes()
- Specified by:
getUriRoutesin interfaceRouteBuilder- Returns:
- Obtain a list of constructed routes
-
getUriNamingStrategy
public RouteBuilder.UriNamingStrategy getUriNamingStrategy()
- Specified by:
getUriNamingStrategyin interfaceRouteBuilder- Returns:
- The URI naming strategy
-
resources
public ResourceRoute resources(java.lang.Class cls)
Description copied from interface:RouteBuilderBuilds the necessary mappings to treat the given class as a REST endpoint.
For example given a class called BookController the following routes will be produced:
GET "/book" GET "/book{/id}" POST "/book" PUT "/book{/id}" PATCH "/book{/id}" DELETE "/book{/id}"By default it is assumed the accepted and returned content type is
MediaType.APPLICATION_JSON_TYPE.- Specified by:
resourcesin interfaceRouteBuilder- Parameters:
cls- The class- Returns:
- The
ResourceRoute
-
single
public ResourceRoute single(java.lang.Class cls)
Description copied from interface:RouteBuilderBuilds the necessary mappings to treat the given class as a singular REST endpoint.
For example given a class called BookController the following routes will be produced:
GET "/book" POST "/book" PUT "/book" PATCH "/book" DELETE "/book"By default it is assumed the accepted and returned content type is
MediaType.APPLICATION_JSON_TYPE.- Specified by:
singlein interfaceRouteBuilder- Parameters:
cls- The class- Returns:
- The
ResourceRoute
-
status
public StatusRoute status(java.lang.Class originatingClass, io.micronaut.http.HttpStatus status, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)
Description copied from interface:RouteBuilderRegister a route to handle the returned status code. This implementation considers the originatingClass for matching.- Specified by:
statusin interfaceRouteBuilder- Parameters:
originatingClass- The class where the error originates fromstatus- The status codetype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
status
public StatusRoute status(io.micronaut.http.HttpStatus status, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)
Description copied from interface:RouteBuilderRegister a route to handle the returned status code.- Specified by:
statusin interfaceRouteBuilder- Parameters:
status- The status codetype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
error
public ErrorRoute error(java.lang.Class originatingClass, java.lang.Class<? extends java.lang.Throwable> error, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)
Description copied from interface:RouteBuilderRegister a route to handle the error.- Specified by:
errorin interfaceRouteBuilder- Parameters:
originatingClass- The class where the error originates fromerror- The error typetype- The type to route tomethod- The method THe method to route toparameterTypes- The parameter types for the target method- Returns:
- The route
-
error
public ErrorRoute error(java.lang.Class<? extends java.lang.Throwable> error, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)
Description copied from interface:RouteBuilderRegister a route to handle the error.- Specified by:
errorin interfaceRouteBuilder- Parameters:
error- The errortype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
GET
public UriRoute GET(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
GETin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
GET
public UriRoute GET(java.lang.String uri, java.lang.Class<?> type, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
GETin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
POST
public UriRoute POST(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
POSTin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
POST
public UriRoute POST(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
POSTin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
PUT
public UriRoute PUT(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
PUTin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
PUT
public UriRoute PUT(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
PUTin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
PATCH
public UriRoute PATCH(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
PATCHin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
PATCH
public UriRoute PATCH(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
PATCHin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
DELETE
public UriRoute DELETE(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
DELETEin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
DELETE
public UriRoute DELETE(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
DELETEin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
OPTIONS
public UriRoute OPTIONS(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
OPTIONSin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
OPTIONS
public UriRoute OPTIONS(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
OPTIONSin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
HEAD
public UriRoute HEAD(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
HEADin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
HEAD
public UriRoute HEAD(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class... parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
HEADin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
TRACE
public UriRoute TRACE(java.lang.String uri, java.lang.Object target, java.lang.String method, java.lang.Class[] parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
TRACEin interfaceRouteBuilder- Parameters:
uri- The URItarget- The targetmethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
TRACE
public UriRoute TRACE(java.lang.String uri, java.lang.Class type, java.lang.String method, java.lang.Class[] parameterTypes)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
TRACEin interfaceRouteBuilder- Parameters:
uri- The URItype- The typemethod- The methodparameterTypes- The parameter types for the target method- Returns:
- The route
-
GET
public UriRoute GET(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
GETin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
POST
public UriRoute POST(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
POSTin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
PUT
public UriRoute PUT(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
PUTin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
PATCH
public UriRoute PATCH(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
PATCHin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
DELETE
public UriRoute DELETE(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
DELETEin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
OPTIONS
public UriRoute OPTIONS(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
OPTIONSin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
HEAD
public UriRoute HEAD(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
HEADin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
TRACE
public UriRoute TRACE(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
Description copied from interface:RouteBuilderRoute the specified URI template to the specified target.
The number of variables in the template should match the number of method arguments
- Specified by:
TRACEin interfaceRouteBuilder- Parameters:
uri- The URIbeanDefinition- The bean definitionmethod- The method- Returns:
- The route
-
buildRoute
protected UriRoute buildRoute(io.micronaut.http.HttpMethod httpMethod, java.lang.String uri, java.lang.Class<?> type, java.lang.String method, java.lang.Class... parameterTypes)
Build a route.- Parameters:
httpMethod- The HTTP methoduri- The URItype- The typemethod- The methodparameterTypes- Parameters- Returns:
- an
UriRoute
-
buildRoute
protected UriRoute buildRoute(io.micronaut.http.HttpMethod httpMethod, java.lang.String uri, io.micronaut.inject.MethodExecutionHandle<?,java.lang.Object> executableHandle)
Build a route.- Parameters:
httpMethod- The HTTP methoduri- The URIexecutableHandle- The executable handle- Returns:
- an
UriRoute
-
buildBeanRoute
protected UriRoute buildBeanRoute(java.lang.String httpMethodName, io.micronaut.http.HttpMethod httpMethod, java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
A special case that is required for non standard http methods.- Parameters:
httpMethodName- The name of method. For standard http methods matchesEnum.name()httpMethod- The http method. IsHttpMethod.CUSTOMfor non standard http methods.uri- The uri.beanDefinition- The definition of the bean.method- The method description- Returns:
- The uri route corresponding to the method.
-
-