|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) public @interface Path
Identifies the URI path that a resource class or class method
will serve requests for. Root
resource classes require an @Path annotation.
Classes may also be annotated with
@ConsumeMime
and @ProduceMime
to filter the
requests they will receive.
The container must honour annotations from the javax.annotation package. In
particular, resource class instance lifecycle can be managed using the
javax.annotation.PostConstruct and java.annotation.PreDestroy annotations
and a class can obtain access to container context information using
javax.annotation.Resource as specified in JSR 250.
ConsumeMime
,
ProduceMime
Required Element Summary | |
---|---|
java.lang.String |
value
Defines a URI template for the resource. |
Optional Element Summary | |
---|---|
boolean |
encode
Controls whether the literal part of the supplied value (those characters that are not part of a template variable) are URL encoded. |
boolean |
limited
Controls whether a trailing template variable is limited to a single path segment ( true ) or not (false ). |
Element Detail |
---|
public abstract java.lang.String value
E.g.: @Path("widgets/{id}")
public abstract boolean encode
public abstract boolean limited
true
) or not (false
). E.g.
@Path("widgets/{id}")
would
match widgets/foo but not widgets/foo/bar whereas
@Path(value="widgets/{id}", limit=false)
would match
both.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |