Class DefaultRouteBuilder

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FilterRoute addFilter​(java.lang.String pathPattern, io.micronaut.context.BeanLocator beanLocator, io.micronaut.inject.BeanDefinition<? extends io.micronaut.http.filter.HttpFilter> beanDefinition)
      Add a filter.
      FilterRoute addFilter​(java.lang.String pathPattern, java.util.function.Supplier<io.micronaut.http.filter.HttpFilter> filter)
      Add a filter.
      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.
      protected UriRoute buildRoute​(io.micronaut.http.HttpMethod httpMethod, java.lang.String uri, io.micronaut.inject.MethodExecutionHandle<?,​java.lang.Object> executableHandle)
      Build a route.
      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.
      UriRoute DELETE​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute DELETE​(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.
      UriRoute DELETE​(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.
      ErrorRoute error​(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.
      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)
      Register a route to handle the error.
      UriRoute GET​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute GET​(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.
      UriRoute GET​(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.UriNamingStrategy getUriNamingStrategy()  
      java.util.List<UriRoute> getUriRoutes()  
      UriRoute HEAD​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute HEAD​(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.
      UriRoute HEAD​(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.
      UriRoute OPTIONS​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute OPTIONS​(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.
      UriRoute OPTIONS​(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.
      UriRoute PATCH​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute PATCH​(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.
      UriRoute PATCH​(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.
      UriRoute POST​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute POST​(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.
      UriRoute POST​(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.
      UriRoute PUT​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute PUT​(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.
      UriRoute PUT​(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.
      ResourceRoute resources​(java.lang.Class cls)
      Builds the necessary mappings to treat the given class as a REST endpoint.
      ResourceRoute single​(java.lang.Class cls)
      Builds the necessary mappings to treat the given class as a singular REST endpoint.
      StatusRoute status​(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.
      StatusRoute status​(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.
      UriRoute TRACE​(java.lang.String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,​?> method)
      Route the specified URI template to the specified target.
      UriRoute TRACE​(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.
      UriRoute TRACE​(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
    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • executionHandleLocator

        protected final io.micronaut.context.ExecutionHandleLocator executionHandleLocator
      • 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 locator
        uriNamingStrategy - 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 locator
        uriNamingStrategy - The URI naming strategy
        conversionService - The conversion service
    • Method Detail

      • getExposedPorts

        public java.util.Set<java.lang.Integer> getExposedPorts()
        Specified by:
        getExposedPorts in interface RouteBuilder
        Returns:
        The exposed ports
      • addFilter

        public FilterRoute addFilter​(java.lang.String pathPattern,
                                     java.util.function.Supplier<io.micronaut.http.filter.HttpFilter> filter)
        Description copied from interface: RouteBuilder
        Add a filter.
        Specified by:
        addFilter in interface RouteBuilder
        Parameters:
        pathPattern - The path pattern for the filter
        filter - 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: RouteBuilder
        Add a filter.
        Specified by:
        addFilter in interface RouteBuilder
        Parameters:
        pathPattern - The path pattern for the filter
        beanLocator - The bean locator
        beanDefinition - The bean definition
        Returns:
        The FilterRoute
      • getUriRoutes

        public java.util.List<UriRoute> getUriRoutes()
        Specified by:
        getUriRoutes in interface RouteBuilder
        Returns:
        Obtain a list of constructed routes
      • resources

        public ResourceRoute resources​(java.lang.Class cls)
        Description copied from interface: RouteBuilder

        Builds 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:
        resources in interface RouteBuilder
        Parameters:
        cls - The class
        Returns:
        The ResourceRoute
      • single

        public ResourceRoute single​(java.lang.Class cls)
        Description copied from interface: RouteBuilder

        Builds 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:
        single in interface RouteBuilder
        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: RouteBuilder
        Register a route to handle the returned status code. This implementation considers the originatingClass for matching.
        Specified by:
        status in interface RouteBuilder
        Parameters:
        originatingClass - The class where the error originates from
        status - The status code
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder
        Register a route to handle the returned status code.
        Specified by:
        status in interface RouteBuilder
        Parameters:
        status - The status code
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder
        Register a route to handle the error.
        Specified by:
        error in interface RouteBuilder
        Parameters:
        originatingClass - The class where the error originates from
        error - The error type
        type - The type to route to
        method - The method THe method to route to
        parameterTypes - 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: RouteBuilder
        Register a route to handle the error.
        Specified by:
        error in interface RouteBuilder
        Parameters:
        error - The error
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        GET in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        GET in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        POST in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        POST in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        PUT in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        PUT in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        PATCH in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        PATCH in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        DELETE in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        DELETE in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        OPTIONS in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        OPTIONS in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        HEAD in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        HEAD in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        TRACE in interface RouteBuilder
        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        TRACE in interface RouteBuilder
        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        GET in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        POST in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        PUT in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        PATCH in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        DELETE in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        OPTIONS in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        HEAD in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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: RouteBuilder

        Route the specified URI template to the specified target.

        The number of variables in the template should match the number of method arguments

        Specified by:
        TRACE in interface RouteBuilder
        Parameters:
        uri - The URI
        beanDefinition - The bean definition
        method - 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 method
        uri - The URI
        type - The type
        method - The method
        parameterTypes - 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 method
        uri - The URI
        executableHandle - 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 matches Enum.name()
        httpMethod - The http method. Is HttpMethod.CUSTOM for 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.