Interface RouteBuilder

All Known Implementing Classes:
AnnotatedFilterRouteBuilder, AnnotatedMethodRouteBuilder, DefaultRouteBuilder, ServerFilterRouteBuilder

@Indexed(RouteBuilder.class) public interface RouteBuilder

An interface for classes capable of building HTTP routing information.

Since:
1.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    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 final io.micronaut.core.naming.conventions.PropertyConvention
    Used to signify to the route that the ID of the resource is used.
  • Method Summary

    Modifier and Type
    Method
    Description
    addFilter(String pathPattern, io.micronaut.context.BeanLocator beanLocator, io.micronaut.inject.BeanDefinition<? extends io.micronaut.http.filter.HttpFilter> beanDefinition)
    Add a filter.
    default UriRoute
    DELETE(Class<?> type)
    Route to the specified class.
    default UriRoute
    DELETE(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    DELETE(Object target)
    Route to the specified object.
    default UriRoute
    DELETE(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    DELETE(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    DELETE(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    DELETE(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    DELETE(String uri, Object target)
    Route the specified URI to the specified target for an HTTP DELETE.
    DELETE(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    error(Class<?> originatingClass, Class<? extends Throwable> error, Class<?> type, String method, Class<?>... parameterTypes)
    Register a route to handle the error.
    default ErrorRoute
    error(Class<? extends Throwable> error, Class<?> type)
    Register a route to handle the error.
    error(Class<? extends Throwable> error, Class<?> type, String method, Class<?>... parameterTypes)
    Register a route to handle the error.
    default ErrorRoute
    error(Class<? extends Throwable> error, Object instance)
    Register a route to handle the error.
    default ErrorRoute
    error(Class<? extends Throwable> error, Object instance, String method)
    Register a route to handle the error.
    default ErrorRoute
    error(Class<? extends Throwable> error, Object instance, String method, Class<?>... parameterTypes)
    Register a route to handle the error.
    default UriRoute
    GET(Class<?> type)
    Route to the specified class.
    default UriRoute
    GET(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    GET(Object target)
    Route to the specified object.
    default UriRoute
    GET(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    GET(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    GET(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    GET(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    GET(String uri, Object target)
    Route the specified URI to the specified target for an HTTP GET.
    GET(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
     
     
     
     
     
     
    default UriRoute
    HEAD(Class<?> type)
    Route to the specified class.
    default UriRoute
    HEAD(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    HEAD(Object target)
    Route to the specified object.
    default UriRoute
    HEAD(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    HEAD(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    HEAD(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    HEAD(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    HEAD(String uri, Object target)
    Route the specified URI to the specified target for an HTTP GET.
    HEAD(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    OPTIONS(Class<?> type)
    Route to the specified class.
    default UriRoute
    OPTIONS(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    OPTIONS(Object target)
    Route to the specified object.
    default UriRoute
    OPTIONS(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    OPTIONS(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    OPTIONS(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    OPTIONS(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    OPTIONS(String uri, Object target)
    Route the specified URI to the specified target for an HTTP OPTIONS.
    OPTIONS(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    PATCH(Class<?> type)
    Route to the specified class.
    default UriRoute
    PATCH(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    PATCH(Object target)
    Route to the specified object.
    default UriRoute
    PATCH(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    PATCH(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    PATCH(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    PATCH(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    PATCH(String uri, Object target)
    Route the specified URI to the specified target for an HTTP PATCH.
    PATCH(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    POST(Class<?> type)
    Route to the specified class.
    default UriRoute
    POST(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    POST(Object target)
    Route to the specified object.
    default UriRoute
    POST(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    POST(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    POST(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    POST(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    POST(String uri, Object target, Class<?>... parameterTypes)
    Route the specified URI to the specified target for an HTTP POST.
    POST(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    PUT(Class<?> type)
    Route to the specified class.
    default UriRoute
    PUT(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    PUT(Object target)
    Route to the specified object.
    default UriRoute
    PUT(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    PUT(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    PUT(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    PUT(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    PUT(String uri, Object target)
    Route the specified URI to the specified target for an HTTP PUT.
    PUT(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    resources(Class<?> cls)
    Builds the necessary mappings to treat the given class as a REST endpoint.
    resources(Object instance)
    Builds the necessary mappings to treat the given instance as a REST endpoint.
    single(Class<?> cls)
    Builds the necessary mappings to treat the given class as a singular REST endpoint.
    single(Object instance)
    Builds the necessary mappings to treat the given instance as a singular REST endpoint.
    status(io.micronaut.http.HttpStatus status, Class<?> type, String method, Class<?>... parameterTypes)
    Register a route to handle the returned status code.
    default StatusRoute
    status(io.micronaut.http.HttpStatus status, Object instance, String method)
    Register a route to handle the returned status code.
    status(Class<?> originatingClass, io.micronaut.http.HttpStatus status, Class<?> type, String method, Class<?>... parameterTypes)
    Register a route to handle the returned status code.
    default UriRoute
    TRACE(Class<?> type)
    Route to the specified class.
    default UriRoute
    TRACE(Class<?> type, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified class and ID.
    default UriRoute
    TRACE(Object target)
    Route to the specified object.
    default UriRoute
    TRACE(Object target, io.micronaut.core.naming.conventions.PropertyConvention id)
    Route to the specified object and ID.
    default UriRoute
    TRACE(String uri, io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    default UriRoute
    TRACE(String uri, io.micronaut.inject.ExecutableMethod<?,?> method)
    Route the specified URI template to the specified target.
    TRACE(String uri, Class<?> type, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
    default UriRoute
    TRACE(String uri, Object target)
    Route the specified URI to the specified target for an HTTP GET.
    TRACE(String uri, Object target, String method, Class<?>... parameterTypes)
    Route the specified URI template to the specified target.
  • Field Details

    • 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 Details

    • getExposedPorts

      Set<Integer> getExposedPorts()
      Returns:
      The exposed ports
    • getFilterRoutes

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

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

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

      List<ErrorRoute> getErrorRoutes()
      Returns:
      Obtain a list of constructed routes
    • getUriNamingStrategy

      RouteBuilder.UriNamingStrategy getUriNamingStrategy()
      Returns:
      The URI naming strategy
    • addFilter

      FilterRoute addFilter(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(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(Object instance)

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

      Parameters:
      instance - The instance
      Returns:
      The ResourceRoute
      See Also:
    • single

      ResourceRoute single(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(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:
    • status

      default StatusRoute status(io.micronaut.http.HttpStatus status, Object instance, 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, Class<?> type, String method, 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(Class<?> originatingClass, io.micronaut.http.HttpStatus status, Class<?> type, String method, 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(Class<? extends Throwable> error, Class<?> type, String method, 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(Class<?> originatingClass, Class<? extends Throwable> error, Class<?> type, String method, 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 to route to
      parameterTypes - The parameter types for the target method
      Returns:
      The route
    • error

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

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

      default ErrorRoute error(Class<? extends Throwable> error, Object instance, 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(Class<? extends Throwable> error, Object instance, String method, 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(String uri, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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(String uri, Object target, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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(String uri, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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(String uri, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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(String uri, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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(String uri, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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(String uri, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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(String uri, 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(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(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(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(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(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(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(String uri, Object target, String method, 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(String uri, Class<?> type, String method, 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