public final class JmsMessageHelper extends Object
Message.| Modifier and Type | Method and Description |
|---|---|
static String |
getJMSMessageID(javax.jms.Message message)
Gets the JMSMessageID from the message.
|
static Boolean |
getJMSRedelivered(javax.jms.Message message)
Gets the JMSRedelivered from the message.
|
static javax.jms.Destination |
getJMSReplyTo(javax.jms.Message message)
Gets the JMSReplyTo from the message.
|
static String |
getJMSType(javax.jms.Message message)
Gets the JMSType from the message.
|
static Object |
getProperty(javax.jms.Message jmsMessage,
String name)
Gets a JMS property
|
static boolean |
hasProperty(javax.jms.Message jmsMessage,
String name)
Tests whether a given property with the name exists
|
static String |
normalizeDestinationName(String destination)
Normalizes the destination name, by removing any leading queue or topic prefixes.
|
static Object |
removeJmsProperty(javax.jms.Message jmsMessage,
String name)
Removes the property from the JMS message.
|
static void |
setCorrelationId(javax.jms.Message message,
String correlationId)
Sets the correlation id on the JMS message.
|
static void |
setJMSDeliveryMode(org.apache.camel.Exchange exchange,
javax.jms.Message message,
Object deliveryMode)
Sets the JMSDeliveryMode on the message.
|
static void |
setJMSReplyTo(javax.jms.Message message,
javax.jms.Destination replyTo)
Sets the JMSReplyTo on the message.
|
static void |
setProperty(javax.jms.Message jmsMessage,
String name,
Object value)
Sets the property on the given JMS message.
|
public static Object removeJmsProperty(javax.jms.Message jmsMessage, String name) throws javax.jms.JMSException
jmsMessage - the JMS messagename - name of the property to removejavax.jms.JMSException - can be thrownpublic static boolean hasProperty(javax.jms.Message jmsMessage,
String name)
throws javax.jms.JMSException
jmsMessage - the JMS messagename - name of the property to test if existsjavax.jms.JMSException - can be thrownpublic static Object getProperty(javax.jms.Message jmsMessage, String name) throws javax.jms.JMSException
jmsMessage - the JMS messagename - name of the property to getjavax.jms.JMSException - can be thrownpublic static void setProperty(javax.jms.Message jmsMessage,
String name,
Object value)
throws javax.jms.JMSException
jmsMessage - the JMS messagename - name of the property to setvalue - the valuejavax.jms.JMSException - can be thrownpublic static void setCorrelationId(javax.jms.Message message,
String correlationId)
message - the JMS messagecorrelationId - the correlation idpublic static String normalizeDestinationName(String destination)
destination - the destinationpublic static void setJMSReplyTo(javax.jms.Message message,
javax.jms.Destination replyTo)
message - the messagereplyTo - the reply to destinationpublic static javax.jms.Destination getJMSReplyTo(javax.jms.Message message)
message - the messagepublic static String getJMSType(javax.jms.Message message)
message - the messagepublic static Boolean getJMSRedelivered(javax.jms.Message message)
message - the messagepublic static String getJMSMessageID(javax.jms.Message message)
message - the messagepublic static void setJMSDeliveryMode(org.apache.camel.Exchange exchange,
javax.jms.Message message,
Object deliveryMode)
throws javax.jms.JMSException
exchange - the exchangemessage - the messagedeliveryMode - the delivery mode, either as a String or integerjavax.jms.JMSException - is thrown if error setting the delivery modeApache Camel