|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UMOMessageAdapter
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 |
---|
void addProperties(Map properties)
properties
- the properties add to this messagevoid clearProperties()
Object getProperty(String key)
key
- the key on which to lookup the property value
void setProperty(String key, Object value)
key
- the key on which to associate the valuevalue
- the property valueObject removeProperty(String key)
key
- the property key to remove
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 exceptionString getPayloadAsString() throws Exception
Exception
- Implementation may throw an endpoint specific exceptionSet getPropertyNames()
byte[] getPayloadAsBytes() throws Exception
Exception
- Implemetation may throw an endpoint specific exceptionObject getPayload()
String getUniqueId()
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
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
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
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
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
void setBooleanProperty(String name, boolean value)
name
- the property name or keyvalue
- the property valuevoid setIntProperty(String name, int value)
name
- the property name or keyvalue
- the property valuevoid setLongProperty(String name, long value)
name
- the property name or keyvalue
- the property valuevoid setDoubleProperty(String name, double value)
name
- the property name or keyvalue
- the property valueString 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
void setStringProperty(String name, String value)
name
- the property name or keyvalue
- the property valuevoid setCorrelationId(String id)
id
- the Id reference for this relationshipString getCorrelationId()
int getCorrelationSequence()
void setCorrelationSequence(int sequence)
sequence
- the sequence number or -1 if the sequence is not importantint getCorrelationGroupSize()
void setCorrelationGroupSize(int size)
size
- the total messages in this group or -1 if the size is not knownvoid setReplyTo(Object replyTo)
replyTo
- the endpointUri url to reply toObject getReplyTo()
UMOExceptionPayload getExceptionPayload()
void setExceptionPayload(UMOExceptionPayload payload)
payload
- The exception payloaad to attach to this messagevoid addAttachment(String name, DataHandler dataHandler) throws Exception
Exception
void removeAttachment(String name) throws Exception
Exception
DataHandler getAttachment(String name)
Set getAttachmentNames()
String getEncoding()
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 |