org.fusesource.stompjms.message
Class StompJmsMessageTransformation

java.lang.Object
  extended by org.fusesource.stompjms.message.StompJmsMessageTransformation

public final class StompJmsMessageTransformation
extends java.lang.Object

A helper class for converting normal JMS interfaces into StompJms specific ones.

Version:
$Revision: 1.1 $

Method Summary
static void copyProperties(javax.jms.Message fromMessage, javax.jms.Message toMessage)
          Copies the standard JMS and user defined properties from the givem message to the specified message
static StompJmsDestination transformDestination(javax.jms.Destination destination)
          Creates a an available JMS message from another provider.
static StompJmsMessage transformMessage(javax.jms.Message message)
          Creates a fast shallow copy of the current StompJmsMessage or creates a whole new message instance from an available JMS message from another provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

transformDestination

public static StompJmsDestination transformDestination(javax.jms.Destination destination)
                                                throws javax.jms.JMSException
Creates a an available JMS message from another provider.

Parameters:
destination - - Destination to be converted into StompJms's implementation.
Returns:
StompJmsDestination - StompJms's implementation of the destination.
Throws:
javax.jms.JMSException
javax.jms.JMSException - if an error occurs

transformMessage

public static StompJmsMessage transformMessage(javax.jms.Message message)
                                        throws javax.jms.JMSException
Creates a fast shallow copy of the current StompJmsMessage or creates a whole new message instance from an available JMS message from another provider.

Parameters:
message - - Message to be converted into StompJms's implementation.
connection -
Returns:
StompJmsMessage - StompJms's implementation object of the message.
Throws:
javax.jms.JMSException - if an error occurs

copyProperties

public static void copyProperties(javax.jms.Message fromMessage,
                                  javax.jms.Message toMessage)
                           throws javax.jms.JMSException
Copies the standard JMS and user defined properties from the givem message to the specified message

Parameters:
fromMessage - the message to take the properties from
toMessage - the message to add the properties to
Throws:
javax.jms.JMSException


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.