org.mule.transport.ajax
Class AjaxMessageAdapter
java.lang.Object
org.mule.transport.AbstractMessageAdapter
org.mule.transport.ajax.AjaxMessageAdapter
- All Implemented Interfaces:
- Serializable, ThreadSafeAccess, MessageAdapter
public class AjaxMessageAdapter
- extends AbstractMessageAdapter
A message adapter that will accept JSON endcode DefaultMuleMessageDTO objects,
or a map of objects or just raw payload object.
If the payload is a Map, this adapter will recognise the following keys:
- payload - the object to use a the payload, this can be a JSON encoded string.
If JSON is used a
Map will be created. PAYLOAD_PARAM
- replyTo - the return ajax channel for this message.
REPLYTO_PARAM
Any additional properties will be set on the message in the PropertyScope.INVOCATION scope.
- See Also:
- Serialized Form
| Methods inherited from class org.mule.transport.AbstractMessageAdapter |
addAttachment, addInboundProperties, addProperties, addProperties, assertAccess, clearProperties, getAttachment, getAttachmentNames, getBooleanProperty, getCorrelationGroupSize, getCorrelationId, getCorrelationSequence, getDoubleProperty, getEncoding, getExceptionPayload, getIntProperty, getLongProperty, getProperty, getProperty, getProperty, getPropertyNames, getPropertyNames, getReplyTo, getStringProperty, getUniqueId, isDisabled, newException, newThreadCopy, release, removeAttachment, removeProperty, resetAccessControl, setBooleanProperty, setCorrelationGroupSize, setCorrelationId, setCorrelationSequence, setDoubleProperty, setEncoding, setExceptionPayload, setIntProperty, setLongProperty, setProperty, setProperty, setReplyTo, setStringProperty, toString |
PAYLOAD_PARAM
public static final String PAYLOAD_PARAM
- See Also:
- Constant Field Values
REPLYTO_PARAM
public static final String REPLYTO_PARAM
- See Also:
- Constant Field Values
filter
protected transient IsJsonFilter filter
payload
protected Object payload
AjaxMessageAdapter
public AjaxMessageAdapter(Object message)
throws MuleException
- Throws:
MuleException
AjaxMessageAdapter
public AjaxMessageAdapter(Object message,
MessageAdapter template)
throws MuleException
- Throws:
MuleException
init
protected void init(Object message)
throws MuleException
- Throws:
MuleException
readJsonAs
protected <T> T readJsonAs(Object src,
Class<T> type)
throws DefaultMuleException
- Throws:
DefaultMuleException
getObjectAsStream
protected InputStream getObjectAsStream(Object src)
throws IOException
- Throws:
IOException
getPayload
public Object getPayload()
- Returns:
- the current message
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.