juzu

## Annotation Type Route

-     @Retention(value=RUNTIME)
      @Target(value=METHOD)
      public @interface Route

  Defines a route when Juzu is exposes the application over the HTTP protocol. The route can be used at the application level and at the controller level.

  ## Application routes

  An application package can be annotated to mount the application, this is useful when a compilation unit contains several applications and each needs to be accessed with a different route

  `

          @Route("/myapplication")
          @Application
          package myapplication;

  `

  ## Controller method routes

  Controller methods can be annotated to mount the controller:

  `

          public class MyController {

             @Action
             @Route("/myaction/{value}")
             public Response.Content myAction(String value) { ... }

             @View
             @Route("/myview")
             public Response.Content myView() { ... }

             @Resource
             @Route("/myresource")
             public Response.Content myView() { ... }
          }

  ` The `Param` annotation can be used further more for constraining a parameter in the route path.
  Author:
    Julien Viet

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `value` The route path.

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `int` | `priority` The route priority.

- - ### Element Detail

    - #### value

          public abstract String value

      The route path.
      Returns:
        the route path

    - #### priority

          public abstract int priority

      The route priority.
      Returns:
        the route priority
      Default:
        0

Copyright © 2016 eXo Platform SAS. All rights reserved.