public class BaseMessage extends Object implements Serializable
BaseMessage
A default message implementation used for messages sent
over the wire. client messages should NOT implement MuleMessage.Modifier and Type | Field and Description |
---|---|
protected Map |
context |
protected Object |
message |
Constructor and Description |
---|
BaseMessage(Object message) |
Modifier and Type | Method and Description |
---|---|
void |
addProperties(Map properties)
Adds a map of properties to associated with this message
|
void |
clearProperties()
Removes all properties on this message
|
Object |
getPayload() |
byte[] |
getPayloadAsBytes()
Converts the message implementation into a String representation
|
String |
getPayloadAsString(String encoding)
Converts the message implementation into a String representation
|
Map |
getProperties()
Returns a map of all properties on this message
|
Object |
getProperty(Object key) |
void |
setProperty(Object key,
Object value) |
String |
toString() |
public BaseMessage(Object message)
public String getPayloadAsString(String encoding) throws Exception
Exception
- Implementation may throw an endpoint specific exceptionpublic byte[] getPayloadAsBytes() throws Exception
Exception
- Implemetation may throw an endpoint specific exceptionpublic Object getPayload()
public void addProperties(Map properties)
properties
- the properties add to this messagepublic void clearProperties()
public Map getProperties()
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.