Package org.apache.qpid.jms.message
Class JmsMessageTransformation
java.lang.Object
org.apache.qpid.jms.message.JmsMessageTransformation
A helper class for converting normal JMS interfaces into the QpidJMS specific
versions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyProperties(JmsConnection connection, jakarta.jms.Message source, JmsMessage target) Copies the standard JMS and user defined properties from the given source message to the specified target message.static voidstatic JmsDestinationtransformDestination(JmsConnection connection, jakarta.jms.Destination destination) Creates a an available JMS message from another provider.static JmsMessagetransformMessage(JmsConnection connection, jakarta.jms.Message message) Creates a new JmsMessage object and populates it using the details of the given Message.
-
Constructor Details
-
JmsMessageTransformation
public JmsMessageTransformation()
-
-
Method Details
-
transformDestination
public static JmsDestination transformDestination(JmsConnection connection, jakarta.jms.Destination destination) throws jakarta.jms.JMSException Creates a an available JMS message from another provider.- Parameters:
connection- The Connection instance that is requesting the transformation.destination- Destination to be converted into Jms's implementation.- Returns:
- JmsDestination - Jms's implementation of the destination.
- Throws:
jakarta.jms.JMSException- if an error occurs during the transformation.
-
transformMessage
public static JmsMessage transformMessage(JmsConnection connection, jakarta.jms.Message message) throws jakarta.jms.JMSException Creates a new JmsMessage object and populates it using the details of the given Message.- Parameters:
connection- The JmsConnection where this transformation is being initiated.message- Message to be converted into the clients implementation.- Returns:
- JmsMessage The client's implementation object for the incoming message.
- Throws:
jakarta.jms.JMSException- if an error occurs during the transform.
-
copyProperties
public static void copyProperties(JmsConnection connection, jakarta.jms.Message source, JmsMessage target) throws jakarta.jms.JMSException Copies the standard JMS and user defined properties from the given source message to the specified target message. The copy can only handle the JMS specific message properties and known JMS Headers, any headers that are specific to the foreign message may be lost if not returned directly via thepropertyNamesmethod.- Parameters:
connection- The Connection instance that is requesting the transformation.source- the message to take the properties fromtarget- the message to add the properties to- Throws:
jakarta.jms.JMSException- if an error occurs during the copy of message properties.
-
setUnresolvedDestinationHandler
-
getUnresolvedDestinationTransformer
-