Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Nested Class Summary

Nested classes/interfaces inherited from interface org.mule.api.ThreadSafeAccess
`ThreadSafeAccess.AccessControl`

Field Summary
`protected IsJsonFilter` | `filter`
`protected Object` | `payload`
`static String` | `PAYLOAD_PARAM`
`static String` | `REPLYTO_PARAM`

Fields inherited from class org.mule.transport.AbstractMessageAdapter
`attachments, exceptionPayload, id, logger, properties`

Fields inherited from interface org.mule.api.ThreadSafeAccess
`READ, WRITE`

Constructor Summary
`AjaxMessageAdapter(Object message)`
`AjaxMessageAdapter(Object message, MessageAdapter template)`

Method Summary
`protected InputStream` | `getObjectAsStream(Object src)`
`Object` | `getPayload()`
`protected void` | `init(Object message)`
`protected
`<T> T`
` | `readJsonAs(Object src, Class<T> type)`

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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### AjaxMessageAdapter

    public AjaxMessageAdapter(Object message)
                       throws MuleException

Throws:
  `MuleException`

### AjaxMessageAdapter

    public AjaxMessageAdapter(Object message,
                              MessageAdapter template)
                       throws MuleException

Throws:
  `MuleException`

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.