Apache CXF API

org.apache.cxf.jaxrs.provider.jsonp
Class JsonpInInterceptor

java.lang.Object
  extended by org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
      extended by org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor
All Implemented Interfaces:
Interceptor<Message>, PhaseInterceptor<Message>

public class JsonpInInterceptor
extends AbstractPhaseInterceptor<Message>

Sets a callback key in the message exchange for HTTP requests containing the '_jsonp' parameter in the querystring.


Field Summary
static String CALLBACK_KEY
           
static String CALLBACK_PARAM
           
static String DEFAULT_CALLBACK_VALUE
           
static String JSONP_TYPE
           
 
Constructor Summary
JsonpInInterceptor()
           
JsonpInInterceptor(String phase)
           
 
Method Summary
 String getAcceptType()
           
 String getCallbackParam()
           
protected  String getCallbackValue(Message message)
           
 String getDefaultCallback()
           
 String getMediaType()
           
 void handleMessage(Message message)
          Intercepts a message.
 void setAcceptType(String acceptType)
           
 void setCallbackParam(String callbackParam)
           
 void setDefaultCallback(String defaultCallback)
           
 void setMediaType(String mediaType)
           
 
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSONP_TYPE

public static final String JSONP_TYPE
See Also:
Constant Field Values

CALLBACK_PARAM

public static final String CALLBACK_PARAM
See Also:
Constant Field Values

CALLBACK_KEY

public static final String CALLBACK_KEY
See Also:
Constant Field Values

DEFAULT_CALLBACK_VALUE

public static final String DEFAULT_CALLBACK_VALUE
See Also:
Constant Field Values
Constructor Detail

JsonpInInterceptor

public JsonpInInterceptor()

JsonpInInterceptor

public JsonpInInterceptor(String phase)
Method Detail

handleMessage

public void handleMessage(Message message)
                   throws Fault
Description copied from interface: Interceptor
Intercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.

Throws:
Fault

getCallbackValue

protected String getCallbackValue(Message message)

setCallbackParam

public void setCallbackParam(String callbackParam)

getCallbackParam

public String getCallbackParam()

setAcceptType

public void setAcceptType(String acceptType)

getAcceptType

public String getAcceptType()

setMediaType

public void setMediaType(String mediaType)

getMediaType

public String getMediaType()

setDefaultCallback

public void setDefaultCallback(String defaultCallback)

getDefaultCallback

public String getDefaultCallback()

Apache CXF API

Apache CXF