Interface RouteBuilder

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  RouteBuilder.UriNamingStrategy
      A URI naming strategy is used to dictate the default name to use when building a URI for a class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static io.micronaut.core.naming.conventions.PropertyConvention ID
      Used to signify to the route that the ID of the resource is used.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default 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.
      default UriRoute DELETE​(java.lang.Class type)
      Route to the specified class.
      default UriRoute DELETE​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute DELETE​(java.lang.Object target)
      Route to the specified object.
      default UriRoute DELETE​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute DELETE​(java.lang.String uri, 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.
      default UriRoute DELETE​(java.lang.String uri, java.lang.Object target)
      Route the specified URI to the specified target for an HTTP DELETE.
      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.
      default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error, java.lang.Class type)
      Register a route to handle the error.
      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.
      default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error, java.lang.Object instance)
      Register a route to handle the error.
      default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error, java.lang.Object instance, java.lang.String method)
      Register a route to handle the error.
      default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error, java.lang.Object instance, 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.
      default UriRoute GET​(java.lang.Class type)
      Route to the specified class.
      default UriRoute GET​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute GET​(java.lang.Object target)
      Route to the specified object.
      default UriRoute GET​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute GET​(java.lang.String uri, 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.
      default UriRoute GET​(java.lang.String uri, java.lang.Object target)
      Route the specified URI to the specified target for an HTTP GET.
      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()  
      default UriRoute HEAD​(java.lang.Class type)
      Route to the specified class.
      default UriRoute HEAD​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute HEAD​(java.lang.Object target)
      Route to the specified object.
      default UriRoute HEAD​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute HEAD​(java.lang.String uri, 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.
      default UriRoute HEAD​(java.lang.String uri, java.lang.Object target)
      Route the specified URI to the specified target for an HTTP GET.
      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.
      default UriRoute OPTIONS​(java.lang.Class type)
      Route to the specified class.
      default UriRoute OPTIONS​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute OPTIONS​(java.lang.Object target)
      Route to the specified object.
      default UriRoute OPTIONS​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute OPTIONS​(java.lang.String uri, 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.
      default UriRoute OPTIONS​(java.lang.String uri, java.lang.Object target)
      Route the specified URI to the specified target for an HTTP OPTIONS.
      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.
      default UriRoute PATCH​(java.lang.Class type)
      Route to the specified class.
      default UriRoute PATCH​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute PATCH​(java.lang.Object target)
      Route to the specified object.
      default UriRoute PATCH​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute PATCH​(java.lang.String uri, 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.
      default UriRoute PATCH​(java.lang.String uri, java.lang.Object target)
      Route the specified URI to the specified target for an HTTP PATCH.
      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.
      default UriRoute POST​(java.lang.Class type)
      Route to the specified class.
      default UriRoute POST​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute POST​(java.lang.Object target)
      Route to the specified object.
      default UriRoute POST​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute POST​(java.lang.String uri, 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.
      default UriRoute POST​(java.lang.String uri, java.lang.Object target, java.lang.Class... parameterTypes)
      Route the specified URI to the specified target for an HTTP POST.
      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.
      default UriRoute PUT​(java.lang.Class type)
      Route to the specified class.
      default UriRoute PUT​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute PUT​(java.lang.Object target)
      Route to the specified object.
      default UriRoute PUT​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute PUT​(java.lang.String uri, 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.
      default UriRoute PUT​(java.lang.String uri, java.lang.Object target)
      Route the specified URI to the specified target for an HTTP PUT.
      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.
      default ResourceRoute resources​(java.lang.Object instance)
      Builds the necessary mappings to treat the given instance as a REST endpoint.
      ResourceRoute single​(java.lang.Class cls)
      Builds the necessary mappings to treat the given class as a singular REST endpoint.
      default ResourceRoute single​(java.lang.Object instance)
      Builds the necessary mappings to treat the given instance 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.
      default StatusRoute status​(io.micronaut.http.HttpStatus status, java.lang.Object instance, java.lang.String method)
      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.
      default UriRoute TRACE​(java.lang.Class type)
      Route to the specified class.
      default UriRoute TRACE​(java.lang.Class type, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified class and ID.
      default UriRoute TRACE​(java.lang.Object target)
      Route to the specified object.
      default UriRoute TRACE​(java.lang.Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
      Route to the specified object and ID.
      default 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.
      default UriRoute TRACE​(java.lang.String uri, 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.
      default UriRoute TRACE​(java.lang.String uri, java.lang.Object target)
      Route the specified URI to the specified target for an HTTP GET.
      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.
    • Field Detail

      • ID

        static final io.micronaut.core.naming.conventions.PropertyConvention ID
        Used to signify to the route that the ID of the resource is used.
    • Method Detail

      • getExposedPorts

        java.util.Set<java.lang.Integer> getExposedPorts()
        Returns:
        The exposed ports
      • getFilterRoutes

        java.util.List<FilterRoute> getFilterRoutes()
        Returns:
        The filter routes
      • getUriRoutes

        java.util.List<UriRoute> getUriRoutes()
        Returns:
        Obtain a list of constructed routes
      • getStatusRoutes

        java.util.List<StatusRoute> getStatusRoutes()
        Returns:
        Obtain a list of constructed routes
      • getErrorRoutes

        java.util.List<ErrorRoute> getErrorRoutes()
        Returns:
        Obtain a list of constructed routes
      • addFilter

        FilterRoute addFilter​(java.lang.String pathPattern,
                              java.util.function.Supplier<io.micronaut.http.filter.HttpFilter> filter)
        Add a filter.
        Parameters:
        pathPattern - The path pattern for the filter
        filter - The filter itself
        Returns:
        The FilterRoute
      • addFilter

        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.
        Parameters:
        pathPattern - The path pattern for the filter
        beanLocator - The bean locator
        beanDefinition - The bean definition
        Returns:
        The FilterRoute
        Since:
        2.0
      • resources

        ResourceRoute resources​(java.lang.Class cls)

        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.

        Parameters:
        cls - The class
        Returns:
        The ResourceRoute
      • resources

        default ResourceRoute resources​(java.lang.Object instance)

        Builds the necessary mappings to treat the given instance as a REST endpoint.

        Parameters:
        instance - The instance
        Returns:
        The ResourceRoute
        See Also:
        resources(Class)
      • single

        ResourceRoute single​(java.lang.Class cls)

        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.

        Parameters:
        cls - The class
        Returns:
        The ResourceRoute
      • single

        default ResourceRoute single​(java.lang.Object instance)

        Builds the necessary mappings to treat the given instance as a singular REST endpoint.

        Parameters:
        instance - The instance
        Returns:
        The ResourceRoute
        See Also:
        single(Class)
      • status

        default StatusRoute status​(io.micronaut.http.HttpStatus status,
                                   java.lang.Object instance,
                                   java.lang.String method)
        Register a route to handle the returned status code.
        Parameters:
        status - The status code
        instance - The instance
        method - The method
        Returns:
        The route
      • status

        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.
        Parameters:
        status - The status code
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • status

        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. This implementation considers the originatingClass for matching.
        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
      • error

        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.
        Parameters:
        error - The error
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • 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.
        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

        default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error,
                                 java.lang.Class type)
        Register a route to handle the error.
        Parameters:
        error - The error
        type - The type
        Returns:
        The route
      • error

        default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error,
                                 java.lang.Object instance)
        Register a route to handle the error.
        Parameters:
        error - The error
        instance - The instance
        Returns:
        The route
      • error

        default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error,
                                 java.lang.Object instance,
                                 java.lang.String method)
        Register a route to handle the error.
        Parameters:
        error - The error
        instance - The instance
        method - The method
        Returns:
        The route
      • error

        default ErrorRoute error​(java.lang.Class<? extends java.lang.Throwable> error,
                                 java.lang.Object instance,
                                 java.lang.String method,
                                 java.lang.Class... parameterTypes)
        Register a route to handle the error.
        Parameters:
        error - The error
        instance - The instance
        method - The method
        parameterTypes - The parameter types
        Returns:
        The route
      • GET

        default UriRoute GET​(java.lang.String uri,
                             java.lang.Object target)
        Route the specified URI to the specified target for an HTTP GET. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        Returns:
        The route
      • GET

        default UriRoute GET​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • GET

        default UriRoute GET​(java.lang.Object target,
                             io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • GET

        default UriRoute GET​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • GET

        default UriRoute GET​(java.lang.Class type,
                             io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • GET

        default UriRoute GET​(java.lang.String uri,
                             io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • GET

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • GET

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • GET

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • POST

        default UriRoute POST​(java.lang.String uri,
                              java.lang.Object target,
                              java.lang.Class... parameterTypes)
        Route the specified URI to the specified target for an HTTP POST. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • POST

        default UriRoute POST​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • POST

        default UriRoute POST​(java.lang.Object target,
                              io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • POST

        default UriRoute POST​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • POST

        default UriRoute POST​(java.lang.Class type,
                              io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • POST

        default UriRoute POST​(java.lang.String uri,
                              io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • POST

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • POST

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • POST

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • PUT

        default UriRoute PUT​(java.lang.String uri,
                             java.lang.Object target)
        Route the specified URI to the specified target for an HTTP PUT. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        Returns:
        The route
      • PUT

        default UriRoute PUT​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • PUT

        default UriRoute PUT​(java.lang.Object target,
                             io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • PUT

        default UriRoute PUT​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • PUT

        default UriRoute PUT​(java.lang.Class type,
                             io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • PUT

        default UriRoute PUT​(java.lang.String uri,
                             io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • PUT

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • PUT

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • PUT

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • PATCH

        default UriRoute PATCH​(java.lang.String uri,
                               java.lang.Object target)
        Route the specified URI to the specified target for an HTTP PATCH. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        Returns:
        The route
      • PATCH

        default UriRoute PATCH​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • PATCH

        default UriRoute PATCH​(java.lang.Object target,
                               io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • PATCH

        default UriRoute PATCH​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • PATCH

        default UriRoute PATCH​(java.lang.Class type,
                               io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • PATCH

        default UriRoute PATCH​(java.lang.String uri,
                               io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • PATCH

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • PATCH

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • PATCH

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • DELETE

        default UriRoute DELETE​(java.lang.String uri,
                                java.lang.Object target)
        Route the specified URI to the specified target for an HTTP DELETE. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        Returns:
        The route
      • DELETE

        default UriRoute DELETE​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • DELETE

        default UriRoute DELETE​(java.lang.Object target,
                                io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • DELETE

        default UriRoute DELETE​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • DELETE

        default UriRoute DELETE​(java.lang.Class type,
                                io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • DELETE

        default UriRoute DELETE​(java.lang.String uri,
                                io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • DELETE

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • DELETE

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • DELETE

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • OPTIONS

        default UriRoute OPTIONS​(java.lang.String uri,
                                 java.lang.Object target)
        Route the specified URI to the specified target for an HTTP OPTIONS. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        Returns:
        The route
      • OPTIONS

        default UriRoute OPTIONS​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • OPTIONS

        default UriRoute OPTIONS​(java.lang.Object target,
                                 io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • OPTIONS

        default UriRoute OPTIONS​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • OPTIONS

        default UriRoute OPTIONS​(java.lang.Class type,
                                 io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • OPTIONS

        default UriRoute OPTIONS​(java.lang.String uri,
                                 io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • OPTIONS

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • OPTIONS

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • OPTIONS

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • HEAD

        default UriRoute HEAD​(java.lang.String uri,
                              java.lang.Object target)
        Route the specified URI to the specified target for an HTTP GET. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        Returns:
        The route
      • HEAD

        default UriRoute HEAD​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • HEAD

        default UriRoute HEAD​(java.lang.Object target,
                              io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • HEAD

        default UriRoute HEAD​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • HEAD

        default UriRoute HEAD​(java.lang.Class type,
                              io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • HEAD

        default UriRoute HEAD​(java.lang.String uri,
                              io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • HEAD

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • HEAD

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • HEAD

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • TRACE

        default UriRoute TRACE​(java.lang.String uri,
                               java.lang.Object target)
        Route the specified URI to the specified target for an HTTP GET. Since the method to execute is not specified "index" is used by default.
        Parameters:
        uri - The URI
        target - The target object
        Returns:
        The route
      • TRACE

        default UriRoute TRACE​(java.lang.Object target)

        Route to the specified object. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        Returns:
        The route
      • TRACE

        default UriRoute TRACE​(java.lang.Object target,
                               io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified object and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        target - The object
        id - The route id
        Returns:
        The route
      • TRACE

        default UriRoute TRACE​(java.lang.Class type)

        Route to the specified class. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        Returns:
        The route
      • TRACE

        default UriRoute TRACE​(java.lang.Class type,
                               io.micronaut.core.naming.conventions.PropertyConvention id)

        Route to the specified class and ID. The URI route is built by the configured RouteBuilder.UriNamingStrategy.

        Parameters:
        type - The class
        id - The route id
        Returns:
        The route
      • TRACE

        default UriRoute TRACE​(java.lang.String uri,
                               io.micronaut.inject.ExecutableMethod<?,​?> method)

        Route the specified URI template to the specified target.

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

        Parameters:
        uri - The URI
        method - The method
        Returns:
        The route
      • TRACE

        default 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.

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

        Parameters:
        beanDefinition - The bean definition
        uri - The URI
        method - The method
        Returns:
        The route
      • TRACE

        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.

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

        Parameters:
        uri - The URI
        target - The target
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route
      • TRACE

        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.

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

        Parameters:
        uri - The URI
        type - The type
        method - The method
        parameterTypes - The parameter types for the target method
        Returns:
        The route