public class JmsMessageAdapter extends AbstractMessageAdapter
JmsMessageAdapter allows a DefaultMuleEvent to access the
properties and payload of a JMS Message in a uniform way. The JmsMessageAdapter
expects a message of type javax.jms.Message and will throw an
IllegalArgumentException if the source message type is not compatible. The
JmsMessageAdapter should be suitable for all JMS Connector implementations.ThreadSafeAccess.AccessControlattachments, encoding, exceptionPayload, id, logger, propertiesREAD, WRITE| Modifier | Constructor and Description |
|---|---|
protected |
JmsMessageAdapter(JmsMessageAdapter template) |
|
JmsMessageAdapter(Object message) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCorrelationId()
Sets a correlationId for 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
|
Object |
getReplyTo()
Sets a replyTo address for this message.
|
String |
getUniqueId()
gets the unique identifier for the message.
|
ThreadSafeAccess |
newThreadCopy() |
void |
setCorrelationId(String id)
Sets a correlationId for this message.
|
void |
setReplyTo(Object replyTo)
Sets a replyTo address for this message.
|
void |
setSpecification(String newSpec) |
addAttachment, addInboundProperties, addProperties, addProperties, assertAccess, clearProperties, getAttachment, getAttachmentNames, getBooleanProperty, getCorrelationGroupSize, getCorrelationSequence, getDoubleProperty, getEncoding, getExceptionPayload, getIntProperty, getLongProperty, getProperty, getProperty, getPropertyNames, getStringProperty, isDisabled, newException, release, removeAttachment, removeProperty, resetAccessControl, setBooleanProperty, setCorrelationGroupSize, setCorrelationSequence, setDoubleProperty, setEncoding, setExceptionPayload, setIntProperty, setLongProperty, setProperty, setProperty, setStringProperty, toStringpublic JmsMessageAdapter(Object message) throws MessagingException
MessagingExceptionprotected JmsMessageAdapter(JmsMessageAdapter template)
public void setSpecification(String newSpec)
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 arrayException - Implementation may throw an endpoint specific exceptionpublic byte[] getPayloadAsBytes()
throws Exception
Exception - Implemetation may throw an endpoint specific exceptionpublic Object getPayload()
public String getUniqueId()
AbstractMessageAdaptergetUniqueId in interface MessageAdaptergetUniqueId in class AbstractMessageAdapterpublic void setCorrelationId(String id)
setCorrelationId in interface MessageAdaptersetCorrelationId in class AbstractMessageAdapterid - the Id reference for this relationshippublic String getCorrelationId()
getCorrelationId in interface MessageAdaptergetCorrelationId in class AbstractMessageAdapterpublic void setReplyTo(Object replyTo)
setReplyTo in interface MessageAdaptersetReplyTo in class AbstractMessageAdapterreplyTo - the endpointUri url to reply topublic Object getReplyTo()
getReplyTo in interface MessageAdaptergetReplyTo in class AbstractMessageAdapterpublic ThreadSafeAccess newThreadCopy()
AbstractMessageAdapternewThreadCopy in interface ThreadSafeAccessnewThreadCopy in class AbstractMessageAdapterCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.