|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@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.
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 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.
| Required Element Summary | |
|---|---|
String |
value
The route path. |
| Optional Element Summary | |
|---|---|
int |
priority
The route priority. |
| Element Detail |
|---|
public abstract String value
public abstract int priority
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||