org.apache.shindig.protocol
Annotation Type Service
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Service
Indicates the base path for REST calls or the RPC service name a RequestHandler
can dispatch to. Define parameter binding for REST path variables
|
Required Element Summary |
String |
name
The name of the service this handler exports. |
|
Optional Element Summary |
String |
path
The structure of the REST paths used to address this service. |
name
public abstract String name
- The name of the service this handler exports. This is also the name of the
root path element of the REST endpoint. E.g. The "activities" service
consumes all paths under /activities/...
path
public abstract String path
- The structure of the REST paths used to address this service. Paths
can contain placeholders delimited by {...} that bind a named parameter or
set of parameters to the request. A plural parameter is denoted by appending '+'
after the named parameter. Parameters are bound in order left-to-right and
missing path segments are bound to null or empty sets
E.g.
/{userId}+/{group}/{personId}+ will parameterize the following URLs
/1/@self => { userId : [1], group : @self, personId : []}
/1/@self => { userId : [1], group : @self, personId : []}
/1,2/@friends => { userId : [1,2], group : @friends, personId : []}
/1,2/@friends/2,3 => { userId : [1,2], group : @friends, personId : [2,3]}
- Default:
- ""
Copyright © 2007-2012. All Rights Reserved.