|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageAdapter
MessageAdapter
provides a common abstraction of different
message implementations provided by different underlying technologies.
Method Summary | |
---|---|
void |
addAttachment(String name,
DataHandler dataHandler)
Allows for arbitary data attachments to be associated with the Message. |
void |
addProperties(Map properties)
Adds a map of properties to be associated with this message |
void |
addProperties(Map properties,
PropertyScope scope)
Adds a map of properties to be associated with this message |
void |
clearProperties()
Removes all properties on this message |
DataHandler |
getAttachment(String name)
Retrieve an attachment with the given name. |
Set |
getAttachmentNames()
Returns a set of the names of the attachments on this message. |
boolean |
getBooleanProperty(String name,
boolean defaultValue)
Gets a boolean property from the message |
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 message |
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 |
int |
getIntProperty(String name,
int defaultValue)
Gets an integer property from the message |
long |
getLongProperty(String name,
long defaultValue)
Gets a long property from the message |
Object |
getPayload()
|
Object |
getProperty(String key)
Gets a property of the message implementation |
Object |
getProperty(String name,
Object defaultValue)
Gets a property from the message |
Object |
getProperty(String name,
PropertyScope scope)
Gets a property from the message with a given scope |
Set |
getPropertyNames()
|
Set |
getPropertyNames(PropertyScope scope)
Gets all property names in a given scope |
Object |
getReplyTo()
Returns a replyTo address for this message. |
String |
getStringProperty(String name,
String defaultValue)
Gets a String property from the message |
String |
getUniqueId()
gets the unique identifier for the message. |
void |
release()
Perform any clean up operations on the message resource. |
void |
removeAttachment(String name)
Remove an attahcment form this message with the specifed name |
Object |
removeProperty(String key)
Removes a property on this message |
void |
setBooleanProperty(String name,
boolean value)
Sets a boolean property on the message |
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 message |
void |
setEncoding(String encoding)
Sets the encoding for this message |
void |
setExceptionPayload(ExceptionPayload 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 message |
void |
setLongProperty(String name,
long value)
Sets a long property on the message |
void |
setProperty(String key,
Object value)
Set a property on the message |
void |
setProperty(String key,
Object value,
PropertyScope scope)
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 message |
Method Detail |
---|
void addProperties(Map properties)
properties
- the properties add to this messagevoid addProperties(Map properties, PropertyScope scope)
properties
- the properties add to this messagescope
- the scope in which the proeprties should be addedvoid 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 valuevoid setProperty(String key, Object value, PropertyScope scope)
key
- the key on which to associate the valuevalue
- the property valuescope
- The scope at which to set the property atPropertyScope
Object removeProperty(String key)
key
- the property key to remove
Set getPropertyNames()
Set getPropertyNames(PropertyScope scope)
scope
- the scope of property names
Object 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
Object getProperty(String name, PropertyScope scope)
name
- the name or key of the propertyscope
- The scope of the property to retrieve
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()
ExceptionPayload getExceptionPayload()
void setExceptionPayload(ExceptionPayload payload)
payload
- The exception payload to attach to this messagevoid addAttachment(String name, DataHandler dataHandler) throws Exception
name
- the name to associate with the attachmentdataHandler
- The attachment datahandler to use. This will be used to interract with the attachment data
Exception
DataHandler
void removeAttachment(String name) throws Exception
name
- the name of the attachment to remove. If the attachment does not exist, the request may be ignorred
Exception
- different messaging systems handle attachments differnetly, as such some will throw an exception
if an attahcment does dot exist.DataHandler getAttachment(String name)
name
- the name of the attachment to retrieve
DataHandler
Set getAttachmentNames()
String getEncoding()
void setEncoding(String encoding)
encoding
- the encoding to usevoid release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |