org.apache.camel.component.jms
Class JmsMessageHelper

java.lang.Object
  extended by org.apache.camel.component.jms.JmsMessageHelper

public final class JmsMessageHelper
extends Object

Utility class for Message.

Version:
$Revision: 19423 $

Method Summary
static boolean hasProperty(Message jmsMessage, String name)
          Tests whether a given property with the name exists
static Object removeJmsProperty(Message jmsMessage, String name)
          Removes the property from the JMS message.
static void setProperty(Message jmsMessage, String name, Object value)
          Sets the property on the given JMS message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

removeJmsProperty

public static Object removeJmsProperty(Message jmsMessage,
                                       String name)
                                throws JMSException
Removes the property from the JMS message.

Parameters:
jmsMessage - the JMS message
name - name of the property to remove
Returns:
the old value of the property or null if not exists
Throws:
JMSException - can be thrown

hasProperty

public static boolean hasProperty(Message jmsMessage,
                                  String name)
                           throws JMSException
Tests whether a given property with the name exists

Parameters:
jmsMessage - the JMS message
name - name of the property to test if exists
Returns:
true if the property exists, false if not.
Throws:
JMSException - can be thrown

setProperty

public static void setProperty(Message jmsMessage,
                               String name,
                               Object value)
                        throws JMSException
Sets the property on the given JMS message.

Parameters:
jmsMessage - the JMS message
name - name of the property to set
value - the value
Throws:
JMSException - can be thrown


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.