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, properties
READ, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttachment, 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, setStringProperty
protected Object message
protected DefaultMessageAdapter()
public DefaultMessageAdapter(Object message)
message
- the message to wrap. If this is null and NullPayload object
will be usedNullPayload
public 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
,
DataHandler
public Object getPayload()
getPayload
in interface MessageAdapter
public void setPayload(Object payload)
setPayload
in interface MutableMessageAdapter
payload
- the object to assign as the message payloadpublic String getUniqueId()
getUniqueId
in interface MessageAdapter
getUniqueId
in class AbstractMessageAdapter
public ThreadSafeAccess newThreadCopy()
newThreadCopy
in interface ThreadSafeAccess
newThreadCopy
in class AbstractMessageAdapter
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.