public class DefaultMuleMessage extends Object implements MuleMessage, ThreadSafeAccess, DeserializationPostInitialisable
DefaultMuleMessage is a wrapper that contains a payload and properties
associated with the payload.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMuleMessage.SerializedDataHandler |
ThreadSafeAccess.AccessControlDeserializationPostInitialisable.Implementation| Modifier and Type | Field and Description |
|---|---|
protected MuleContext |
muleContext |
protected static String |
NOT_SET |
READ, WRITE| Constructor and Description |
|---|
DefaultMuleMessage(MuleMessage message) |
DefaultMuleMessage(Object message,
Map<String,Object> outboundProperties,
Map<String,DataHandler> attachments,
MuleContext muleContext) |
DefaultMuleMessage(Object message,
Map<String,Object> inboundProperties,
Map<String,Object> outboundProperties,
Map<String,DataHandler> attachments,
MuleContext muleContext) |
DefaultMuleMessage(Object message,
Map<String,Object> inboundProperties,
Map<String,Object> outboundProperties,
Map<String,DataHandler> attachments,
MuleContext muleContext,
DataType dataType) |
DefaultMuleMessage(Object message,
Map<String,Object> outboundProperties,
MuleContext muleContext) |
DefaultMuleMessage(Object message,
MuleContext muleContext) |
DefaultMuleMessage(Object message,
MuleMessage previous,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(String name,
DataHandler dataHandler)
Deprecated.
|
void |
addInboundAttachment(String name,
DataHandler dataHandler) |
void |
addInboundProperties(Map<String,Object> props) |
void |
addOutboundAttachment(String name,
DataHandler dataHandler)
Allows for arbitrary data attachments to be associated with the Message.
|
void |
addOutboundAttachment(String name,
Object object,
String contentType)
Adds an outgoing attachment to the message
|
void |
addProperties(Map<String,Object> props)
Adds a map of properties to be associated with this message
|
void |
addProperties(Map<String,Object> props,
PropertyScope scope)
Adds a map of properties to be associated with this message
|
protected void |
applyAllTransformers(MuleEvent event,
List<? extends Transformer> transformers) |
void |
applyTransformers(MuleEvent event,
List<? extends Transformer> transformers)
Will apply a list of transformers to the payload of the message.
|
void |
applyTransformers(MuleEvent event,
List<? extends Transformer> transformers,
Class<?> outputType)
Will apply a list of transformers to the payload of the message.
|
void |
applyTransformers(MuleEvent event,
Transformer... transformers)
Will apply a list of transformers to the payload of the message.
|
void |
assertAccess(boolean write)
This method may be called before data in the object are accessed.
|
void |
clearAttachments()
Removes all outbound attachments on this message.
|
void |
clearProperties()
Removes all properties on this message in the
PropertyScope.INVOCATION and
PropertyScope.OUTBOUND. |
void |
clearProperties(PropertyScope scope)
Removes all properties on this message in the given scope.
|
protected void |
copyMessageProperties(MuleMessage muleMessage) |
protected void |
copyToInbound(DefaultMuleMessage newMessage)
copy outbound artifacts to inbound artifacts in the new message
|
MuleMessage |
createInboundMessage()
Copy an inbound message to an outbound one, moving all message properties and attachments
|
boolean |
equals(Object obj) |
<T> T |
findPropertyInAnyScope(String name,
T defaultValue)
This method was added with the introduction of Property scopes.
|
<T> T |
findPropertyInSpecifiedScopes(String name,
PropertyScope... scopesToSearch)
Find property in one of the specified scopes, in order
|
DataHandler |
getAttachment(String name)
Deprecated.
|
Set<String> |
getAttachmentNames()
Deprecated.
|
boolean |
getBooleanProperty(String name,
boolean defaultValue)
Deprecated.
|
int |
getCorrelationGroupSize()
Determines how many messages are in the correlation group
|
String |
getCorrelationId()
Sets a correlationId for this message.
|
int |
getCorrelationSequence()
Gets the sequence or ordering number for this message in the the correlation
group (as defined by the correlationId)
|
DataType<?> |
getDataType()
Returns the data type (if any) associated with the message's payload.
|
double |
getDoubleProperty(String name,
double defaultValue)
Deprecated.
|
String |
getEncoding()
Gets the encoding for the current message.
|
ExceptionPayload |
getExceptionPayload()
If an error occurred during the processing of this message this will return a
ErrorPayload that contains the root exception and Mule error code, plus any
other releated info
|
DataHandler |
getInboundAttachment(String name)
Retrieve an attachment with the given name.
|
Set<String> |
getInboundAttachmentNames() |
<T> T |
getInboundProperty(String name) |
<T> T |
getInboundProperty(String name,
T defaultValue) |
Set<String> |
getInboundPropertyNames() |
int |
getIntProperty(String name,
int defaultValue)
Deprecated.
|
<T> T |
getInvocationProperty(String name) |
<T> T |
getInvocationProperty(String name,
T defaultValue) |
Set<String> |
getInvocationPropertyNames() |
long |
getLongProperty(String name,
long defaultValue)
Deprecated.
|
String |
getMessageRootId()
gets an identifier that is the same among parent and child messages
|
MuleContext |
getMuleContext() |
Object |
getOriginalPayload()
Returns the original payload used to create this message.
|
protected Map<String,TypedValue> |
getOrphanFlowVariables() |
DataHandler |
getOutboundAttachment(String name)
Retrieve an attachment with the given name.
|
Set<String> |
getOutboundAttachmentNames() |
<T> T |
getOutboundProperty(String name) |
<T> T |
getOutboundProperty(String name,
T defaultValue) |
Set<String> |
getOutboundPropertyNames() |
Object |
getPayload() |
<T> T |
getPayload(Class<T> outputType)
Will attempt to obtain the payload of this message with the desired Class type.
|
<T> T |
getPayload(DataType<T> outputType)
Will attempt to obtain the payload of this message with the desired Class type.
|
protected <T> T |
getPayload(DataType<T> resultType,
String encoding)
Will attempt to obtain the payload of this message with the desired Class type.
|
byte[] |
getPayloadAsBytes()
Converts the message implementation into a byte array representation
|
String |
getPayloadAsString()
Converts the message implementation into a String representation.
|
String |
getPayloadAsString(String encoding)
Converts the message implementation into a String representation
|
String |
getPayloadForLogging()
Get the message payload for logging without throwing exception
Converts the message implementation into a String representation.
|
String |
getPayloadForLogging(String encoding)
Get the message payload for logging without throwing exception
Converts the message implementation into a String representation.
|
Object |
getProperty(String key)
Deprecated.
|
Object |
getProperty(String name,
Object defaultValue)
Gets a property from the message
|
<T> T |
getProperty(String name,
PropertyScope scope)
Gets a property from the message with a given scope.
|
<T> T |
getProperty(String name,
PropertyScope scope,
T defaultValue)
Gets a property from the message with a given scope and provides a default value if the property is not
present on the message in the scope specified.
|
DataType<?> |
getPropertyDataType(String name,
PropertyScope scope)
Gets a property data type from the message with a given scope.
|
Set<String> |
getPropertyNames()
Deprecated.
|
Set<String> |
getPropertyNames(PropertyScope scope)
Gets all property names in a given scope.
|
Object |
getReplyTo()
Returns a replyTo address for this message.
|
<T> T |
getSessionProperty(String name) |
<T> T |
getSessionProperty(String name,
T defaultValue) |
Set<String> |
getSessionPropertyNames() |
String |
getStringProperty(String name,
String defaultValue)
Deprecated.
|
String |
getUniqueId()
gets the unique identifier for the message.
|
int |
hashCode() |
void |
initAfterDeserialisation(MuleContext context)
Invoked after deserialization.
|
boolean |
isConsumable()
Determines if the payload of this message is consumable i.e.
|
protected boolean |
isDisabled() |
protected boolean |
isPayloadConsumed(Class<?> inputCls)
Checks if the payload has been consumed for this message.
|
protected IllegalStateException |
newException(String message) |
ThreadSafeAccess |
newThreadCopy() |
void |
propagateRootId(MuleMessage parent)
copy the message root id from parent to child
|
void |
release()
Perform any clean up operations on the message resource.
|
void |
removeAttachment(String name)
Deprecated.
|
void |
removeOutboundAttachment(String name)
Remove an attachment form this message with the specified name
|
Object |
removeProperty(String key)
Removes a property on this message.
|
Object |
removeProperty(String key,
PropertyScope scope)
Removes a property on this message from the specified scope only.
|
void |
resetAccessControl()
This method should ONLY be used in the construction of composite ThreadSafeAccess instances.
|
void |
setBooleanProperty(String name,
boolean value)
Deprecated.
|
void |
setCorrelationGroupSize(int size)
Determines how many messages are in the correlation group
|
void |
setCorrelationId(String id)
Sets a correlationId for this message.
|
void |
setCorrelationSequence(int sequence)
Gets the sequence or ordering number for this message in the the correlation
group (as defined by the correlationId)
|
protected void |
setDataType(DataType<?> dt) |
void |
setDoubleProperty(String name,
double value)
Deprecated.
|
void |
setEncoding(String encoding)
Sets the encoding for this message
|
void |
setExceptionPayload(ExceptionPayload exceptionPayload)
If an error occurs while processing this message, a ErrorPayload is attached
which contains the root exception and Mule error code, plus any other releated
info.
|
void |
setInboundProperty(String key,
Object value) |
void |
setInboundProperty(String key,
Object value,
DataType<?> dataType) |
void |
setIntProperty(String name,
int value)
Deprecated.
|
void |
setInvocationProperty(String key,
Object value) |
void |
setInvocationProperty(String key,
Object value,
DataType<?> dataType) |
void |
setLongProperty(String name,
long value)
Deprecated.
|
void |
setMessageRootId(String rid)
set the root ID for the message
|
void |
setMimeType(String mimeType) |
void |
setMuleContext(MuleContext context) |
void |
setOutboundProperty(String key,
Object value) |
void |
setOutboundProperty(String key,
Object value,
DataType<?> dataType) |
void |
setPayload(Object payload)
Update the message payload.
|
void |
setPayload(Object payload,
DataType<?> dataType)
Updates the message payload.
|
void |
setProperty(String key,
Object value)
Deprecated.
use
setProperty(String, Object, org.mule.api.transport.PropertyScope) or
preferrably any of the scope-specific set methods. |
void |
setProperty(String key,
Object value,
PropertyScope scope)
Set a property on the message.
|
void |
setProperty(String key,
Object value,
PropertyScope scope,
DataType<?> dataType)
Sets a property on the message
|
void |
setReplyTo(Object replyTo)
Sets a replyTo address for this message.
|
void |
setSessionProperty(String key,
Object value) |
void |
setStringProperty(String name,
String value)
Deprecated.
|
void |
setUniqueId(String uid) |
String |
toString() |
protected static final String NOT_SET
protected transient MuleContext muleContext
public DefaultMuleMessage(MuleMessage message)
public DefaultMuleMessage(Object message, MuleContext muleContext)
public DefaultMuleMessage(Object message, Map<String,Object> outboundProperties, MuleContext muleContext)
public DefaultMuleMessage(Object message, Map<String,Object> outboundProperties, Map<String,DataHandler> attachments, MuleContext muleContext)
public DefaultMuleMessage(Object message, Map<String,Object> inboundProperties, Map<String,Object> outboundProperties, Map<String,DataHandler> attachments, MuleContext muleContext)
public DefaultMuleMessage(Object message, Map<String,Object> inboundProperties, Map<String,Object> outboundProperties, Map<String,DataHandler> attachments, MuleContext muleContext, DataType dataType)
public DefaultMuleMessage(Object message, MuleMessage previous, MuleContext muleContext)
protected void copyMessageProperties(MuleMessage muleMessage)
public void setMuleContext(MuleContext context)
public <T> T getPayload(Class<T> outputType) throws TransformerException
getPayload in interface MuleMessageoutputType - the desired return typeTransformerException - if a transformer cannot be found or there is an error during transformation of the
payloadpublic <T> T getPayload(DataType<T> outputType) throws TransformerException
getPayload in interface MuleMessageoutputType - the desired return typeTransformerException - if a transformer cannot be found or there is an error during transformation of the
payloadpublic MuleContext getMuleContext()
getMuleContext in interface MuleMessageprotected <T> T getPayload(DataType<T> resultType, String encoding) throws TransformerException
resultType - the desired return typeencoding - the encoding to use if requiredInputStream in which
case the stream will be read and the payload will become the fully read stream.TransformerException - if a transformer cannot be found or there is an error during
transformation of the payload.protected boolean isPayloadConsumed(Class<?> inputCls)
inputCls - the input type of the message payloadpublic Object getOriginalPayload()
MuleMessage.applyTransformers(MuleEvent,java.util.List) or
MuleMessage.applyTransformers(MuleEvent, java.util.List, Class) is called.getOriginalPayload in interface MuleMessagepublic void setInvocationProperty(String key, Object value)
setInvocationProperty in interface MuleMessageMuleMessage.setProperty(String, Object, org.mule.api.transport.PropertyScope)public void setInvocationProperty(String key, Object value, DataType<?> dataType)
setInvocationProperty in interface MuleMessageMuleMessage.setProperty(String, Object, org.mule.api.transport.PropertyScope)public void setOutboundProperty(String key, Object value)
setOutboundProperty in interface MuleMessageMuleMessage.setProperty(String, Object, org.mule.api.transport.PropertyScope)public void setOutboundProperty(String key, Object value, DataType<?> dataType)
setOutboundProperty in interface MuleMessageMuleMessage.setProperty(String, Object, org.mule.api.transport.PropertyScope)public void setSessionProperty(String key, Object value)
setSessionProperty in interface MuleMessagepublic void setProperty(String key, Object value, PropertyScope scope)
setProperty in interface MuleMessagekey - the key on which to associate the valuevalue - the property valuescope - The scope at which to set the property atPropertyScope,
MuleMessage.setInvocationProperty(String, Object),
MuleMessage.setOutboundProperty(String, Object),
MuleMessage.setSessionProperty(String, Object)public void setProperty(String key, Object value, PropertyScope scope, DataType<?> dataType)
MuleMessagesetProperty in interface MuleMessagekey - the key on which to associate the valuevalue - the property valuescope - The scope at which to set the property atdataType - the data type for the property value@Deprecated public Object getProperty(String key)
public Object removeProperty(String key)
removeProperty in interface MuleMessagekey - the property key to removepublic Object removeProperty(String key, PropertyScope scope)
removeProperty in interface MuleMessagekey - the property key to removescope - The scope at which to set the property at@Deprecated public void setProperty(String key, Object value)
setProperty(String, Object, org.mule.api.transport.PropertyScope) or
preferrably any of the scope-specific set methods.setProperty in interface MuleMessagekey - the key on which to associate the valuevalue - the property valuesetInboundProperty(String, Object),
setInvocationProperty(String, Object),
setOutboundProperty(String, Object),
setSessionProperty(String, Object)public final String getPayloadAsString() throws Exception
getPayloadAsString in interface MuleMessageException - Implementation may throw an endpoint specific exceptionpublic String getPayloadForLogging(String encoding)
getPayloadForLogging in interface MuleMessagepublic String getPayloadForLogging()
getPayloadForLogging in interface MuleMessagepublic byte[] getPayloadAsBytes()
throws Exception
getPayloadAsBytes in interface MuleMessageException - Implemetation may throw an endpoint specific exceptionpublic String getPayloadAsString(String encoding) throws Exception
getPayloadAsString in interface MuleMessageencoding - The encoding to use when transforming the message (if
necessary). The parameter is used when converting from a byte arrayException - Implementation may throw an endpoint specific exception@Deprecated public Set<String> getPropertyNames()
getPropertyNames(org.mule.api.transport.PropertyScope)getPropertyNames in interface MuleMessagepublic Set<String> getPropertyNames(PropertyScope scope)
getPropertyNames in interface MuleMessagescope - the scope of property namesMuleMessage.getInvocationPropertyNames(),
MuleMessage.getInboundPropertyNames(),
MuleMessage.getOutboundPropertyNames(),
MuleMessage.getSessionPropertyNames()public Set<String> getInvocationPropertyNames()
getInvocationPropertyNames in interface MuleMessagepublic Set<String> getInboundPropertyNames()
getInboundPropertyNames in interface MuleMessagepublic Set<String> getOutboundPropertyNames()
getOutboundPropertyNames in interface MuleMessagepublic Set<String> getSessionPropertyNames()
getSessionPropertyNames in interface MuleMessagepublic String getUniqueId()
getUniqueId in interface MuleMessagepublic void setUniqueId(String uid)
public String getMessageRootId()
MuleMessagegetMessageRootId in interface MuleMessagepublic void setMessageRootId(String rid)
MuleMessagesetMessageRootId in interface MuleMessagepublic void propagateRootId(MuleMessage parent)
MuleMessagepropagateRootId in interface MuleMessagepublic Object getProperty(String name, Object defaultValue)
getProperty in interface MuleMessagename - the name or key of the property. This must be non-null.defaultValue - a default value if the property doesn't exist in the event. This can be null.MuleMessage.getInboundProperty(String),
MuleMessage.getOutboundProperty(String),
MuleMessage.getInvocationProperty(String),
MuleMessage.getSessionProperty(String)public <T> T getProperty(String name, PropertyScope scope)
getProperty in interface MuleMessagename - the name or key of the property. This must be non-null.scope - The scope of the property to retrieve. This must be non-null.MuleMessage.getInboundProperty(String),
MuleMessage.getOutboundProperty(String),
MuleMessage.getInvocationProperty(String),
MuleMessage.getSessionProperty(String)public <T> T getInboundProperty(String name, T defaultValue)
getInboundProperty in interface MuleMessageMuleMessage.getProperty(String, org.mule.api.transport.PropertyScope, Object)public <T> T getInboundProperty(String name)
getInboundProperty in interface MuleMessageMuleMessage.getProperty(String, org.mule.api.transport.PropertyScope, Object)public <T> T getInvocationProperty(String name, T defaultValue)
getInvocationProperty in interface MuleMessageMuleMessage.getProperty(String, org.mule.api.transport.PropertyScope, Object)public <T> T getInvocationProperty(String name)
getInvocationProperty in interface MuleMessageMuleMessage.getProperty(String, org.mule.api.transport.PropertyScope, Object)public <T> T getOutboundProperty(String name, T defaultValue)
getOutboundProperty in interface MuleMessageMuleMessage.getProperty(String, org.mule.api.transport.PropertyScope, Object)public <T> T getOutboundProperty(String name)
getOutboundProperty in interface MuleMessageMuleMessage.getProperty(String, org.mule.api.transport.PropertyScope, Object)public <T> T getSessionProperty(String name, T defaultValue)
getSessionProperty in interface MuleMessagepublic <T> T getSessionProperty(String name)
getSessionProperty in interface MuleMessagepublic <T> T getProperty(String name, PropertyScope scope, T defaultValue)
getProperty in interface MuleMessageT - the defaultValue type ,this is used to validate the property value typename - the name or key of the property. This must be non-null.scope - The scope of the property to retrieve. This must be non-null.defaultValue - the value to return if the property is not in the scope provided. Can be nullpublic void setCorrelationId(String id)
setCorrelationId in interface MuleMessageid - the Id reference for this relationshippublic String getCorrelationId()
getCorrelationId in interface MuleMessagepublic void setReplyTo(Object replyTo)
setReplyTo in interface MuleMessagereplyTo - the endpointUri url to reply topublic Object getReplyTo()
getReplyTo in interface MuleMessagepublic int getCorrelationSequence()
getCorrelationSequence in interface MuleMessagepublic void setCorrelationSequence(int sequence)
setCorrelationSequence in interface MuleMessagesequence - the sequence number or -1 if the sequence is not importantpublic int getCorrelationGroupSize()
getCorrelationGroupSize in interface MuleMessagepublic void setCorrelationGroupSize(int size)
setCorrelationGroupSize in interface MuleMessagesize - the total messages in this group or -1 if the size is not knownpublic ExceptionPayload getExceptionPayload()
getExceptionPayload in interface MuleMessagepublic void setExceptionPayload(ExceptionPayload exceptionPayload)
setExceptionPayload in interface MuleMessageexceptionPayload - The exception payload to attach to this message@Deprecated public void addAttachment(String name, DataHandler dataHandler) throws Exception
addAttachment in interface MuleMessagename - the name to associate with the attachmentdataHandler - The attachment datahandler to use. This will be used to
interact with the attachment data.Exception - if the attachment cannot be added for any reasonDataHandler@Deprecated public void removeAttachment(String name) throws Exception
removeAttachment in interface MuleMessagename - the name of the attachment to remove. If the attachment does not exist, the request may be ignoredException - different messaging systems handle attachments differently, as such some will throw an exception
if an attachment does dot exist.@Deprecated public DataHandler getAttachment(String name)
getAttachment in interface MuleMessagename - the name of the attachment to retrieveDataHandler@Deprecated public Set<String> getAttachmentNames()
getAttachmentNames in interface MuleMessagepublic void addOutboundAttachment(String name, DataHandler dataHandler) throws Exception
MuleMessageaddOutboundAttachment in interface MuleMessagename - the name to associate with the attachmentdataHandler - The attachment DataHandler to use. This will be used to interact with the attachment dataException - if the attachment cannot be added for any reasonDataHandlerpublic void addInboundAttachment(String name, DataHandler dataHandler) throws Exception
Exceptionpublic void addOutboundAttachment(String name, Object object, String contentType) throws Exception
MuleMessageaddOutboundAttachment in interface MuleMessagename - the name to associate with the attachmentsobject - the input stream to the contents of the attachment. This object can either be a URL, which will construct a URL data source, or
a File, which will construct a file data source. Any other object will be used as the raw contents of the attachmentcontentType - the content type of the attachment. Note that the charset attribute can be specifed too i.e. text/plain;charset=UTF-8Exception - if the attachment cannot be read or createdpublic void removeOutboundAttachment(String name) throws Exception
MuleMessageremoveOutboundAttachment in interface MuleMessagename - the name of the attachment to remove. If the attachment does not exist, the request may be ignoredException - different messaging systems handle attachments differently, as such some will throw an exception
if an attachment does dot exist.public DataHandler getInboundAttachment(String name)
MuleMessagegetInboundAttachment in interface MuleMessagename - the name of the attachment to retrieveDataHandlerpublic DataHandler getOutboundAttachment(String name)
MuleMessagegetOutboundAttachment in interface MuleMessagename - the name of the attachment to retrieveDataHandlerpublic Set<String> getInboundAttachmentNames()
getInboundAttachmentNames in interface MuleMessagepublic Set<String> getOutboundAttachmentNames()
getOutboundAttachmentNames in interface MuleMessagepublic <T> T findPropertyInAnyScope(String name, T defaultValue)
MuleMessagefindPropertyInAnyScope in interface MuleMessageT - The Type of the property value that will be returnedname - the name of the property to look fordefaultValue - the default value that will be returned if the property is not foundpublic String getEncoding()
getEncoding in interface MuleMessagepublic void setEncoding(String encoding)
setEncoding in interface MuleMessageencoding - the encoding to usepublic void setMimeType(String mimeType)
mimeType - public void addProperties(Map<String,Object> props)
addProperties in interface MuleMessageprops - the properties add to this messagepublic void addProperties(Map<String,Object> props, PropertyScope scope)
addProperties in interface MuleMessageprops - the properties add to this messagescope - the scope in which the properties should be addedpublic void clearProperties()
PropertyScope.INVOCATION and
PropertyScope.OUTBOUND.clearProperties in interface MuleMessagepublic void clearProperties(PropertyScope scope)
clearProperties in interface MuleMessagescope - the property scope to clearpublic void clearAttachments()
PropertyScope.OUTBOUND.clearAttachments in interface MuleMessagepublic Object getPayload()
getPayload in interface MuleMessagepublic void setPayload(Object payload)
setPayload in interface MuleMessagepayload - the object to assign as the message payloadpublic void setPayload(Object payload, DataType<?> dataType)
MuleMessagesetPayload in interface MuleMessagepayload - the object to assign as the message payloaddataType - payload's dataType. Not null.public void release()
release in interface MuleMessagepublic void applyTransformers(MuleEvent event, List<? extends Transformer> transformers) throws MuleException
applyTransformers in interface MuleMessageevent - the event being processedtransformers - the transformers to apply to the message payloadTransformerException - if a transformation error occurs or one or more of the transformers passed in a
are incompatible with the message payloadMuleExceptionpublic void applyTransformers(MuleEvent event, Transformer... transformers) throws MuleException
applyTransformers in interface MuleMessageevent - the event being processedtransformers - the transformers to apply to the message payloadTransformerException - if a transformation error occurs or one or more of the transformers passed in a
are incompatible with the message payloadMuleExceptionpublic void applyTransformers(MuleEvent event, List<? extends Transformer> transformers, Class<?> outputType) throws MuleException
MuleMessageapplyTransformers in interface MuleMessageevent - the event being processedtransformers - the transformers to apply to the message payloadoutputType - the required output type for this transformation. by adding this parameter some additional
transformations will occur on the message payload to ensure that the final payload is of the specified type.
If no transformers can be found in the registry that can transform from the return type of the transformation
list to the outputType and exception will be thrownTransformerException - if a transformation error occurs or one or more of the transformers passed in a
are incompatible with the message payloadMuleExceptionprotected void applyAllTransformers(MuleEvent event, List<? extends Transformer> transformers) throws MuleException
MuleExceptionprotected void setDataType(DataType<?> dt)
public ThreadSafeAccess newThreadCopy()
newThreadCopy in interface ThreadSafeAccesspublic void resetAccessControl()
resetAccessControl in interface ThreadSafeAccesspublic void assertAccess(boolean write)
assertAccess in interface ThreadSafeAccesswrite - True if the access will mutate values.protected boolean isDisabled()
protected IllegalStateException newException(String message)
public boolean isConsumable()
public void initAfterDeserialisation(MuleContext context) throws MuleException
DeserializationPostInitialisable is used. This will get invoked
after the object has been deserialized passing in the current mulecontext when using either
SerializationWireFormat,
SerializedMuleMessageWireFormat or the
ByteArrayToSerializable transformer.context - the current muleContext instanceMuleException - if there is an error initializingpublic DataType<?> getDataType()
MuleMessagegetDataType in interface MuleMessage@Deprecated public int getIntProperty(String name, int defaultValue)
getIntProperty in interface MuleMessagename - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event@Deprecated public long getLongProperty(String name, long defaultValue)
getLongProperty in interface MuleMessagename - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event@Deprecated public double getDoubleProperty(String name, double defaultValue)
getDoubleProperty in interface MuleMessagename - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event@Deprecated public boolean getBooleanProperty(String name, boolean defaultValue)
getBooleanProperty in interface MuleMessagename - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event@Deprecated public void setBooleanProperty(String name, boolean value)
setBooleanProperty in interface MuleMessagename - the property name or keyvalue - the property value@Deprecated public void setIntProperty(String name, int value)
setIntProperty in interface MuleMessagename - the property name or keyvalue - the property value@Deprecated public void setLongProperty(String name, long value)
setLongProperty in interface MuleMessagename - the property name or keyvalue - the property value@Deprecated public void setDoubleProperty(String name, double value)
setDoubleProperty in interface MuleMessagename - the property name or keyvalue - the property value@Deprecated public String getStringProperty(String name, String defaultValue)
getStringProperty in interface MuleMessagename - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event@Deprecated public void setStringProperty(String name, String value)
setStringProperty in interface MuleMessagename - the property name or keyvalue - the property valuepublic DataType<?> getPropertyDataType(String name, PropertyScope scope)
MuleMessagegetPropertyDataType in interface MuleMessagename - the name or key of the property. This must be non-null.scope - The scope of the property to retrieve. This must be non-null.public <T> T findPropertyInSpecifiedScopes(String name, PropertyScope... scopesToSearch)
public MuleMessage createInboundMessage() throws Exception
MuleMessagecreateInboundMessage in interface MuleMessageExceptionprotected void copyToInbound(DefaultMuleMessage newMessage) throws Exception
Exceptionprotected Map<String,TypedValue> getOrphanFlowVariables()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.