|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mule.impl.MuleMessage
MuleMessage is a wrapper that contains a payload and properties
associated with the payload.
| Field Summary | |
protected UMOExceptionPayload |
exceptionPayload
|
| Constructor Summary | |
MuleMessage(Object message)
|
|
MuleMessage(Object message,
Map properties)
|
|
MuleMessage(Object message,
UMOMessageAdapter previous)
|
|
| Method Summary | |
void |
addAttachment(String name,
DataHandler dataHandler)
|
void |
addProperties(Map properties)
Adds a map of properties to be associated with this message |
void |
clearProperties()
Removes all properties on this message |
UMOMessageAdapter |
getAdapter()
|
DataHandler |
getAttachment(String name)
|
Set |
getAttachmentNames()
|
boolean |
getBooleanProperty(String name,
boolean defaultValue)
Gets a boolean property from the event |
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) |
double |
getDoubleProperty(String name,
double defaultValue)
Gets a double property from the event |
String |
getEncoding()
Gets the encoding for the current message. |
UMOExceptionPayload |
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 |
int |
getIntProperty(String name,
int defaultValue)
Gets an integer property from the event |
long |
getLongProperty(String name,
long defaultValue)
Gets a long property from the event |
Object |
getPayload()
|
byte[] |
getPayloadAsBytes()
Converts the payload implementation into a String representation |
String |
getPayloadAsString()
Converts the payload implementation into a String representation |
String |
getPayloadAsString(String encoding)
Converts the message implementation into a String representation |
Object |
getProperty(String key)
Gets a property of the payload implementation |
Object |
getProperty(String name,
Object defaultValue)
Gets a property from the event |
Set |
getPropertyNames()
|
Object |
getReplyTo()
Sets a replyTo address for this message. |
String |
getStringProperty(String name,
String defaultValue)
Gets a String property from the event |
String |
getUniqueId()
gets the unique identifier for the message. |
void |
removeAttachment(String name)
|
Object |
removeProperty(String key)
Removes a property on this message |
void |
setBooleanProperty(String name,
boolean value)
Sets a boolean property on the event |
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) |
void |
setDoubleProperty(String name,
double value)
Sets a double property on the event |
void |
setEncoding(String encoding)
Sets the encoding for this message |
void |
setExceptionPayload(UMOExceptionPayload 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 |
setIntProperty(String name,
int value)
Sets a integerproperty on the event |
void |
setLongProperty(String name,
long value)
Sets a long property on the event |
void |
setProperty(String key,
Object value)
Gets a property of the payload implementation |
void |
setReplyTo(Object replyTo)
Sets a replyTo address for this message. |
void |
setStringProperty(String name,
String value)
Sets a String property on the event |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected UMOExceptionPayload exceptionPayload
| Constructor Detail |
public MuleMessage(Object message)
public MuleMessage(Object message,
Map properties)
public MuleMessage(Object message,
UMOMessageAdapter previous)
| Method Detail |
public UMOMessageAdapter getAdapter()
getAdapter in interface UMOMessagepublic Object getProperty(String key)
getProperty in interface UMOMessageAdapterkey - the key on which to lookup the property value
public Object removeProperty(String key)
UMOMessageAdapter
removeProperty in interface UMOMessageAdapterkey - the property key to remove
public void setProperty(String key,
Object value)
setProperty in interface UMOMessageAdapterkey - the key on which to associate the valuevalue - the property value
public String getPayloadAsString()
throws Exception
getPayloadAsString in interface UMOMessageAdapterException - Implemetation may throw an endpoint specific exception
public String getPayloadAsString(String encoding)
throws Exception
getPayloadAsString in interface UMOMessageAdapterencoding - The encoding to use when transforming the message (if
necessary). The parameter is used when converting from a byte array
Exception - Implementation may throw an endpoint specific exceptionpublic Set getPropertyNames()
getPropertyNames in interface UMOMessageAdapter
public byte[] getPayloadAsBytes()
throws Exception
getPayloadAsBytes in interface UMOMessageAdapterException - Implemetation may throw an endpoint specific exceptionpublic Object getPayload()
getPayload in interface UMOMessageAdapterpublic void addProperties(Map properties)
UMOMessageAdapter
addProperties in interface UMOMessageAdapterproperties - the properties add to this messagepublic void clearProperties()
UMOMessageAdapter
clearProperties in interface UMOMessageAdapter
public double getDoubleProperty(String name,
double defaultValue)
getDoubleProperty in interface UMOMessageAdaptername - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event
public void setDoubleProperty(String name,
double value)
setDoubleProperty in interface UMOMessageAdaptername - the property name or keyvalue - the property valuepublic String getUniqueId()
UMOMessageAdapter
getUniqueId in interface UMOMessageAdapter
public Object getProperty(String name,
Object defaultValue)
UMOMessageAdapter
getProperty in interface UMOMessageAdaptername - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event
public int getIntProperty(String name,
int defaultValue)
UMOMessageAdapter
getIntProperty in interface UMOMessageAdaptername - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event
public long getLongProperty(String name,
long defaultValue)
UMOMessageAdapter
getLongProperty in interface UMOMessageAdaptername - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event
public boolean getBooleanProperty(String name,
boolean defaultValue)
UMOMessageAdapter
getBooleanProperty in interface UMOMessageAdaptername - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event
public void setBooleanProperty(String name,
boolean value)
UMOMessageAdapter
setBooleanProperty in interface UMOMessageAdaptername - the property name or keyvalue - the property value
public void setIntProperty(String name,
int value)
UMOMessageAdapter
setIntProperty in interface UMOMessageAdaptername - the property name or keyvalue - the property value
public void setLongProperty(String name,
long value)
UMOMessageAdapter
setLongProperty in interface UMOMessageAdaptername - the property name or keyvalue - the property valuepublic void setCorrelationId(String id)
setCorrelationId in interface UMOMessageAdapterid - the Id reference for this relationshippublic String getCorrelationId()
getCorrelationId in interface UMOMessageAdapterpublic void setReplyTo(Object replyTo)
setReplyTo in interface UMOMessageAdapterreplyTo - the endpointUri url to reply topublic Object getReplyTo()
getReplyTo in interface UMOMessageAdapterpublic int getCorrelationSequence()
getCorrelationSequence in interface UMOMessageAdapterpublic void setCorrelationSequence(int sequence)
setCorrelationSequence in interface UMOMessageAdaptersequence - the sequence number or -1 if the sequence is not importantpublic int getCorrelationGroupSize()
getCorrelationGroupSize in interface UMOMessageAdapterpublic void setCorrelationGroupSize(int size)
setCorrelationGroupSize in interface UMOMessageAdaptersize - the total messages in this group or -1 if the size is not knownpublic UMOExceptionPayload getExceptionPayload()
UMOMessageAdapter
getExceptionPayload in interface UMOMessageAdapterpublic void setExceptionPayload(UMOExceptionPayload exceptionPayload)
UMOMessageAdapter
setExceptionPayload in interface UMOMessageAdapterexceptionPayload - The exception payloaad to attach to this messagepublic String toString()
public void addAttachment(String name,
DataHandler dataHandler)
throws Exception
addAttachment in interface UMOMessageAdapterException
public void removeAttachment(String name)
throws Exception
removeAttachment in interface UMOMessageAdapterExceptionpublic DataHandler getAttachment(String name)
getAttachment in interface UMOMessageAdapterpublic Set getAttachmentNames()
getAttachmentNames in interface UMOMessageAdapterpublic String getEncoding()
getEncoding in interface UMOMessageAdapterpublic void setEncoding(String encoding)
setEncoding in interface UMOMessageAdapterencoding - the encoding to use
public String getStringProperty(String name,
String defaultValue)
getStringProperty in interface UMOMessageAdaptername - the name or key of the propertydefaultValue - a default value if the property doesn't exist in the event
public void setStringProperty(String name,
String value)
setStringProperty in interface UMOMessageAdaptername - the property name or keyvalue - the property value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||