org.apache.shindig.protocol
Annotation Type Operation


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Operation

Annotates a method on a ServiceHandler which expose a REST/RPC operation The name of the annotated method is the literal name of the method for JSON-RPC


Required Element Summary
 String[] httpMethods
          The HTTP methods to bind this operation to.
 
Optional Element Summary
 String bodyParam
          The parameter name to bind the body content to in the RequestItem passed to the REST/RPC handler.
 String name
          The name to match for the RPC operation to override the default behvaior which is to use the name of the annotated method
 String path
          The path to match for the operation to override the service path matching and parameter binding.
 

Element Detail

httpMethods

public abstract String[] httpMethods
The HTTP methods to bind this operation to.

bodyParam

public abstract String bodyParam
The parameter name to bind the body content to in the RequestItem passed to the REST/RPC handler.

Default:
"body"

path

public abstract String path
The path to match for the operation to override the service path matching and parameter binding. This is useful for situations such as //@supportedFields where the path determines the operation rather than the HTTP method in REST

Default:
""

name

public abstract String name
The name to match for the RPC operation to override the default behvaior which is to use the name of the annotated method

Default:
""


Copyright © 2007-2012. All Rights Reserved.