org.mule.impl.message
Class BaseMessage

java.lang.Object
  extended byorg.mule.providers.AbstractMessageAdapter
      extended byorg.mule.impl.message.BaseMessage
All Implemented Interfaces:
java.io.Serializable, UMOMessage, UMOMessageAdapter
Direct Known Subclasses:
ExceptionMessage

public class BaseMessage
extends AbstractMessageAdapter
implements UMOMessage

BaseMessage A default message implementation

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason
See Also:
Serialized Form

Field Summary
protected  java.lang.Object message
           
 
Fields inherited from class org.mule.providers.AbstractMessageAdapter
properties
 
Constructor Summary
BaseMessage(java.lang.Object 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
 java.lang.Object getPayload()
           
 byte[] getPayloadAsBytes()
          Converts the message implementation into a String representation
 java.lang.String getPayloadAsString()
          Converts the message implementation into a String representation
 java.util.Map getProperties()
          Returns a map of all properties on this message
 
Methods inherited from class org.mule.providers.AbstractMessageAdapter
getBooleanProperty, getCorrelationGroupSize, getCorrelationId, getCorrelationSequence, getDoubleProperty, getErrorCode, getIntProperty, getLongProperty, getProperty, getProperty, getPropertyNames, getReplyTo, getUniqueId, removeProperty, setBooleanProperty, setCorrelationGroupSize, setCorrelationId, setCorrelationSequence, setDoubleProperty, setErrorCode, setIntProperty, setLongProperty, setProperty, setReplyTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.umo.provider.UMOMessageAdapter
getBooleanProperty, getCorrelationGroupSize, getCorrelationId, getCorrelationSequence, getDoubleProperty, getErrorCode, getIntProperty, getLongProperty, getProperty, getProperty, getPropertyNames, getReplyTo, getUniqueId, removeProperty, setBooleanProperty, setCorrelationGroupSize, setCorrelationId, setCorrelationSequence, setDoubleProperty, setErrorCode, setIntProperty, setLongProperty, setProperty, setReplyTo
 

Field Detail

message

protected java.lang.Object message
Constructor Detail

BaseMessage

public BaseMessage(java.lang.Object message)
Method Detail

getPayloadAsString

public java.lang.String getPayloadAsString()
                                    throws java.lang.Exception
Converts the message implementation into a String representation

Specified by:
getPayloadAsString in interface UMOMessageAdapter
Returns:
String representation of the message payload
Throws:
java.lang.Exception - Implementation may throw an endpoint specific exception

getPayloadAsBytes

public byte[] getPayloadAsBytes()
                         throws java.lang.Exception
Converts the message implementation into a String representation

Specified by:
getPayloadAsBytes in interface UMOMessageAdapter
Returns:
String representation of the message
Throws:
java.lang.Exception - Implemetation may throw an endpoint specific exception

getPayload

public java.lang.Object getPayload()
Specified by:
getPayload in interface UMOMessageAdapter
Returns:
the current message

addProperties

public void addProperties(java.util.Map properties)
Adds a map of properties to associated with this message

Specified by:
addProperties in interface UMOMessage
Parameters:
properties - the properties add to this message

clearProperties

public void clearProperties()
Removes all properties on this message

Specified by:
clearProperties in interface UMOMessage

getProperties

public java.util.Map getProperties()
Returns a map of all properties on this message

Specified by:
getProperties in interface UMOMessage
Returns:
a map of all properties on this message


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.