Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## 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.Render myAction(String value) { ... }

           @View
           @Route("/myview")
           public Response.Render 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
`String` | `value` The route path.

Optional Element Summary
`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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2013 eXo Platform SAS. All Rights Reserved.