public final class DefaultMessageAdapter extends AbstractMessageAdapter implements MutableMessageAdapter
DefaultMessageAdapter can be used to wrap an arbitary object where
no special 'apapting' is needed. The adapter allows for a set of properties to be
associated with an object.ThreadSafeAccess.AccessControl| Modifier and Type | Field and Description |
|---|---|
protected Object |
message
The message object wrapped by this adapter
|
attachments, encoding, exceptionPayload, id, logger, propertiesREAD, WRITE| Modifier | Constructor and Description |
|---|---|
protected |
DefaultMessageAdapter() |
|
DefaultMessageAdapter(Object message)
Creates a default message adapter with properties and attachments
|
|
DefaultMessageAdapter(Object message,
Map properties,
Map attachments)
Creates a default message adapter with properties and attachments
|
|
DefaultMessageAdapter(Object message,
MessageAdapter previous) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getPayload() |
String |
getUniqueId()
gets the unique identifier for the message.
|
ThreadSafeAccess |
newThreadCopy() |
void |
setPayload(Object payload)
Update the message payload.
|
addAttachment, addInboundProperties, addProperties, addProperties, assertAccess, clearProperties, getAttachment, getAttachmentNames, getBooleanProperty, getCorrelationGroupSize, getCorrelationId, getCorrelationSequence, getDoubleProperty, getEncoding, getExceptionPayload, getIntProperty, getLongProperty, getProperty, getProperty, getPropertyNames, getReplyTo, getStringProperty, isDisabled, newException, release, removeAttachment, removeProperty, resetAccessControl, setBooleanProperty, setCorrelationGroupSize, setCorrelationId, setCorrelationSequence, setDoubleProperty, setEncoding, setExceptionPayload, setIntProperty, setLongProperty, setProperty, setProperty, setReplyTo, setStringProperty, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAttachment, addProperties, addProperties, clearProperties, getAttachment, getAttachmentNames, getBooleanProperty, getCorrelationGroupSize, getCorrelationId, getCorrelationSequence, getDoubleProperty, getEncoding, getExceptionPayload, getIntProperty, getLongProperty, getProperty, getProperty, getPropertyNames, getReplyTo, getStringProperty, release, removeAttachment, removeProperty, setBooleanProperty, setCorrelationGroupSize, setCorrelationId, setCorrelationSequence, setDoubleProperty, setEncoding, setExceptionPayload, setIntProperty, setLongProperty, setProperty, setProperty, setReplyTo, setStringPropertyprotected Object message
protected DefaultMessageAdapter()
public DefaultMessageAdapter(Object message)
message - the message to wrap. If this is null and NullPayload object
will be usedNullPayloadpublic DefaultMessageAdapter(Object message, MessageAdapter previous)
public DefaultMessageAdapter(Object message, Map properties, Map attachments)
message - the message to wrap. If this is null and NullPayload object
will be usedproperties - a map properties to set on the adapter. Can be null.attachments - a map attaches (DataHandler objects) to set on the adapter.
Can be null.NullPayload,
DataHandlerpublic Object getPayload()
getPayload in interface MessageAdapterpublic void setPayload(Object payload)
setPayload in interface MutableMessageAdapterpayload - the object to assign as the message payloadpublic String getUniqueId()
getUniqueId in interface MessageAdaptergetUniqueId in class AbstractMessageAdapterpublic ThreadSafeAccess newThreadCopy()
newThreadCopy in interface ThreadSafeAccessnewThreadCopy in class AbstractMessageAdapterCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.