org.glassfish.jersey.server
Annotation Type JSONP


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Documented
public @interface JSONP

This annotation can be used to define the JavaScript callback function name if the valid JSONP format is requested as an acceptable media type of this request. At the moment only resource methods should be annotated with this annotation.

The acceptable JavaScript media types for JSONP compatible with this annotation are:

Author:
Michal Gajdos (michal.gajdos at oracle.com)

Optional Element Summary
 String callback
          Name of the JavaScript callback function to which the JSON result should be wrapped into.
 boolean isQueryParam
          A flag to determine whether the #callback should be treated as a query parameter name (present in .net.URI).
 

callback

public abstract String callback
Name of the JavaScript callback function to which the JSON result should be wrapped into. If the #isQueryParam value is true then the actual callback function name is determined from the query parameter name (defined by the value of this property), otherwise the value of this property is used as the JavaScript callback function name.

Default:
"callback"

isQueryParam

public abstract boolean isQueryParam
A flag to determine whether the #callback should be treated as a query parameter name (present in .net.URI).

Default:
false


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.