Package org.restlet.ext.json
Class JsonpFilter
- java.lang.Object
-
- org.restlet.Restlet
-
- org.restlet.routing.Filter
-
- org.restlet.ext.json.JsonpFilter
-
- All Implemented Interfaces:
org.restlet.Uniform
public class JsonpFilter extends org.restlet.routing.Filter
Filter that converts response entity of the JSON media type into a JSONP callback document. Make sure that you properly pass a "callback" query parameter in the URI query string with the name of your JavaScrip callback method. SeeJsonpRepresentation
for the actual wrapper representation used internally.- Author:
- Mark Kharitonov
-
-
Constructor Summary
Constructors Constructor Description JsonpFilter(org.restlet.Context context)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterHandle(org.restlet.Request request, org.restlet.Response response)
Assumes that there is a "callback" query parameter available in the URI query string, containing the name of the JavaScript callback method.-
Methods inherited from class org.restlet.routing.Filter
beforeHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop
-
-
-
-
Method Detail
-
afterHandle
public void afterHandle(org.restlet.Request request, org.restlet.Response response)
Assumes that there is a "callback" query parameter available in the URI query string, containing the name of the JavaScript callback method.- Overrides:
afterHandle
in classorg.restlet.routing.Filter
-
-