|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
UMOMessageAdapter
provides a common abstraction of different
message implementations provided by different underlying technologies.
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 |
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 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 |
Object |
getProperty(String key)
Gets a property of the message implementation |
Object |
getProperty(String name,
Object defaultValue)
Gets a property from the event |
Set |
getPropertyNames()
|
Object |
getReplyTo()
Returns 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 payload)
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)
Set a property on the message |
void |
setReplyTo(Object replyTo)
Sets a replyTo address for this message. |
void |
setStringProperty(String name,
String value)
Sets a String property on the event |
Method Detail |
public void addProperties(Map properties)
properties
- the properties add to this messagepublic void clearProperties()
public Object getProperty(String key)
key
- the key on which to lookup the property value
public void setProperty(String key, Object value)
key
- the key on which to associate the valuevalue
- the property valuepublic Object removeProperty(String key)
key
- the property key to remove
public String getPayloadAsString(String encoding) throws Exception
encoding
- 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 String getPayloadAsString() throws Exception
Exception
- Implementation may throw an endpoint specific exceptionpublic Set getPropertyNames()
public byte[] getPayloadAsBytes() throws Exception
Exception
- Implemetation may throw an endpoint specific exceptionpublic Object getPayload()
public String getUniqueId()
public Object getProperty(String name, Object defaultValue)
name
- 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)
name
- 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)
name
- the name or key of the propertydefaultValue
- a default value if the property doesn't exist in the event
public double getDoubleProperty(String name, double defaultValue)
name
- 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)
name
- 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)
name
- the property name or keyvalue
- the property valuepublic void setIntProperty(String name, int value)
name
- the property name or keyvalue
- the property valuepublic void setLongProperty(String name, long value)
name
- the property name or keyvalue
- the property valuepublic void setDoubleProperty(String name, double value)
name
- the property name or keyvalue
- the property valuepublic String getStringProperty(String name, String defaultValue)
name
- 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)
name
- the property name or keyvalue
- the property valuepublic void setCorrelationId(String id)
id
- the Id reference for this relationshippublic String getCorrelationId()
public int getCorrelationSequence()
public void setCorrelationSequence(int sequence)
sequence
- the sequence number or -1 if the sequence is not importantpublic int getCorrelationGroupSize()
public void setCorrelationGroupSize(int size)
size
- the total messages in this group or -1 if the size is not knownpublic void setReplyTo(Object replyTo)
replyTo
- the endpointUri url to reply topublic Object getReplyTo()
public UMOExceptionPayload getExceptionPayload()
public void setExceptionPayload(UMOExceptionPayload payload)
payload
- The exception payloaad to attach to this messagepublic void addAttachment(String name, DataHandler dataHandler) throws Exception
Exception
public void removeAttachment(String name) throws Exception
Exception
public DataHandler getAttachment(String name)
public Set getAttachmentNames()
public String getEncoding()
public void setEncoding(String encoding)
encoding
- the encoding to use
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |