Package org.apache.qpid.jms.message
Class JmsMessageTransformation
- java.lang.Object
-
- org.apache.qpid.jms.message.JmsMessageTransformation
-
public final class JmsMessageTransformation extends java.lang.ObjectA helper class for converting normal JMS interfaces into the QpidJMS specific versions.
-
-
Constructor Summary
Constructors Constructor Description JmsMessageTransformation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 JmsUnresolvedDestinationTransformergetUnresolvedDestinationTransformer()static voidsetUnresolvedDestinationHandler(JmsUnresolvedDestinationTransformer handler)static 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.
-
-
-
Method Detail
-
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
public static void setUnresolvedDestinationHandler(JmsUnresolvedDestinationTransformer handler)
-
getUnresolvedDestinationTransformer
public static JmsUnresolvedDestinationTransformer getUnresolvedDestinationTransformer()
-
-