|
|||||||||||
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 payload and properties
associated with the payload.
Constructor Summary | |
MuleMessage(java.lang.Object message,
java.util.Map props)
|
|
MuleMessage(UMOMessageAdapter message)
|
Method Summary | |
void |
addProperties(java.util.Map properties)
Adds a map of properties to associated with this message |
void |
clearProperties()
Removes all properties on this message |
UMOMessageAdapter |
getAdapter()
|
boolean |
getBooleanProperty(java.lang.String name,
boolean defaultValue)
Gets a boolean property from the event |
int |
getCorrelationGroupSize()
Determines how many messages are in the correlation group |
java.lang.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(java.lang.String name,
double defaultValue)
Gets a double property from the event |
int |
getErrorCode()
If an error occurred during the processing of this message this will return a value greater than zero |
int |
getIntProperty(java.lang.String name,
int defaultValue)
Gets an integer property from the event |
long |
getLongProperty(java.lang.String name,
long defaultValue)
Gets a long property from the event |
java.lang.Object |
getPayload()
|
byte[] |
getPayloadAsBytes()
Converts the payload implementation into a String representation |
java.lang.String |
getPayloadAsString()
Converts the payload implementation into a String representation |
java.util.Map |
getProperties()
Returns a map of all properties on this message |
java.lang.Object |
getProperty(java.lang.Object key)
Gets a property of the payload implementation |
java.lang.Object |
getProperty(java.lang.String name,
java.lang.Object defaultValue)
Gets a property from the event |
java.util.Iterator |
getPropertyNames()
|
java.lang.Object |
getReplyTo()
Sets a replyTo address for this message. |
java.lang.String |
getUniqueId()
gets the unique identifier for the message. |
java.lang.Object |
removeProperty(java.lang.Object key)
Removes a property on this message |
void |
setBooleanProperty(java.lang.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(java.lang.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(java.lang.String name,
double value)
Sets a double property on the event |
void |
setErrorCode(int code)
If an error occurs while processing this message, this error code should be set to a value greater than zero and the palyoad of the this message should contain the error details |
void |
setIntProperty(java.lang.String name,
int value)
Sets a integerproperty on the event |
void |
setLongProperty(java.lang.String name,
long value)
Sets a long property on the event |
void |
setProperty(java.lang.Object key,
java.lang.Object value)
Gets a property of the payload implementation |
void |
setReplyTo(java.lang.Object replyTo)
Sets a replyTo address for this message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MuleMessage(UMOMessageAdapter message)
public MuleMessage(java.lang.Object message, java.util.Map props)
Method Detail |
public UMOMessageAdapter getAdapter()
public java.lang.Object getProperty(java.lang.Object key)
getProperty
in interface UMOMessageAdapter
key
- the key on which to lookup the property value
public java.lang.Object removeProperty(java.lang.Object key)
UMOMessageAdapter
removeProperty
in interface UMOMessageAdapter
key
- the property key to remove
public void setProperty(java.lang.Object key, java.lang.Object value)
setProperty
in interface UMOMessageAdapter
key
- the key on which to associate the valuevalue
- the property valuepublic java.lang.String getPayloadAsString() throws java.lang.Exception
getPayloadAsString
in interface UMOMessageAdapter
java.lang.Exception
- Implemetation may throw an endpoint specific exceptionpublic java.util.Iterator getPropertyNames()
getPropertyNames
in interface UMOMessageAdapter
public byte[] getPayloadAsBytes() throws java.lang.Exception
getPayloadAsBytes
in interface UMOMessageAdapter
java.lang.Exception
- Implemetation may throw an endpoint specific exceptionpublic java.lang.Object getPayload()
getPayload
in interface UMOMessageAdapter
public void addProperties(java.util.Map properties)
UMOMessage
addProperties
in interface UMOMessage
properties
- the properties add to this messagepublic java.util.Map getProperties()
UMOMessage
getProperties
in interface UMOMessage
public void clearProperties()
UMOMessage
clearProperties
in interface UMOMessage
public double getDoubleProperty(java.lang.String name, double defaultValue)
getDoubleProperty
in interface UMOMessageAdapter
name
- the name or key of the propertydefaultValue
- a default value if the property doesn't exist in the event
public void setDoubleProperty(java.lang.String name, double value)
setDoubleProperty
in interface UMOMessageAdapter
name
- the property name or keyvalue
- the property valuepublic java.lang.String getUniqueId() throws UniqueIdNotSupportedException
UMOMessageAdapter
getUniqueId
in interface UMOMessageAdapter
UniqueIdNotSupportedException
- if the message does not support
a unique identifierpublic java.lang.Object getProperty(java.lang.String name, java.lang.Object defaultValue)
UMOMessageAdapter
getProperty
in interface UMOMessageAdapter
name
- the name or key of the propertydefaultValue
- a default value if the property doesn't exist in the event
public int getIntProperty(java.lang.String name, int defaultValue)
UMOMessageAdapter
getIntProperty
in interface UMOMessageAdapter
name
- the name or key of the propertydefaultValue
- a default value if the property doesn't exist in the event
public long getLongProperty(java.lang.String name, long defaultValue)
UMOMessageAdapter
getLongProperty
in interface UMOMessageAdapter
name
- the name or key of the propertydefaultValue
- a default value if the property doesn't exist in the event
public boolean getBooleanProperty(java.lang.String name, boolean defaultValue)
UMOMessageAdapter
getBooleanProperty
in interface UMOMessageAdapter
name
- the name or key of the propertydefaultValue
- a default value if the property doesn't exist in the event
public void setBooleanProperty(java.lang.String name, boolean value)
UMOMessageAdapter
setBooleanProperty
in interface UMOMessageAdapter
name
- the property name or keyvalue
- the property valuepublic void setIntProperty(java.lang.String name, int value)
UMOMessageAdapter
setIntProperty
in interface UMOMessageAdapter
name
- the property name or keyvalue
- the property valuepublic void setLongProperty(java.lang.String name, long value)
UMOMessageAdapter
setLongProperty
in interface UMOMessageAdapter
name
- the property name or keyvalue
- the property valuepublic void setCorrelationId(java.lang.String id)
setCorrelationId
in interface UMOMessageAdapter
id
- the Id reference for this relationshippublic java.lang.String getCorrelationId()
getCorrelationId
in interface UMOMessageAdapter
public void setReplyTo(java.lang.Object replyTo)
setReplyTo
in interface UMOMessageAdapter
replyTo
- the endpointUri url to reply topublic java.lang.Object getReplyTo()
getReplyTo
in interface UMOMessageAdapter
public int getCorrelationSequence()
getCorrelationSequence
in interface UMOMessageAdapter
public void setCorrelationSequence(int sequence)
setCorrelationSequence
in interface UMOMessageAdapter
sequence
- the sequence number or -1 if the sequence is not importantpublic int getCorrelationGroupSize()
getCorrelationGroupSize
in interface UMOMessageAdapter
public void setCorrelationGroupSize(int size)
setCorrelationGroupSize
in interface UMOMessageAdapter
size
- the total messages in this group or -1 if the size is not knownpublic int getErrorCode()
getErrorCode
in interface UMOMessageAdapter
public void setErrorCode(int code)
setErrorCode
in interface UMOMessageAdapter
code
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |