Package org.apache.activemq
Class ActiveMQMessageTransformation
java.lang.Object
org.apache.activemq.ActiveMQMessageTransformation
A helper class for converting normal JMS interfaces into ActiveMQ specific
ones.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyProperties
(jakarta.jms.Message fromMessage, jakarta.jms.Message toMessage) Copies the standard JMS and user defined properties from the givem message to the specified messagestatic ActiveMQDestination
transformDestination
(jakarta.jms.Destination destination) Creates a an available JMS message from another provider.static ActiveMQMessage
transformMessage
(jakarta.jms.Message message, ActiveMQConnection connection) Creates a fast shallow copy of the current ActiveMQMessage or creates a whole new message instance from an available JMS message from another provider.
-
Method Details
-
transformDestination
public static ActiveMQDestination transformDestination(jakarta.jms.Destination destination) throws jakarta.jms.JMSException Creates a an available JMS message from another provider.- Parameters:
destination
- - Destination to be converted into ActiveMQ's implementation.- Returns:
- ActiveMQDestination - ActiveMQ's implementation of the destination.
- Throws:
jakarta.jms.JMSException
- if an error occurs
-
transformMessage
public static ActiveMQMessage transformMessage(jakarta.jms.Message message, ActiveMQConnection connection) throws jakarta.jms.JMSException Creates a fast shallow copy of the current ActiveMQMessage or creates a whole new message instance from an available JMS message from another provider.- Parameters:
message
- - Message to be converted into ActiveMQ's implementation.connection
-- Returns:
- ActiveMQMessage - ActiveMQ's implementation object of the message.
- Throws:
jakarta.jms.JMSException
- if an error occurs
-
copyProperties
public static void copyProperties(jakarta.jms.Message fromMessage, jakarta.jms.Message toMessage) throws jakarta.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 fromtoMessage
- the message to add the properties to- Throws:
jakarta.jms.JMSException
-