Class AmqpDestinationHelper


  • public class AmqpDestinationHelper
    extends java.lang.Object
    A set of static utility method useful when mapping JmsDestination types to / from the AMQP destination fields in a Message that's being sent or received.
    • Field Detail

      • JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL

        public static final org.apache.qpid.proton.amqp.Symbol JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL
      • JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL

        public static final org.apache.qpid.proton.amqp.Symbol JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL
      • QUEUE_CAPABILITY

        public static final org.apache.qpid.proton.amqp.Symbol QUEUE_CAPABILITY
      • TOPIC_CAPABILITY

        public static final org.apache.qpid.proton.amqp.Symbol TOPIC_CAPABILITY
      • TEMP_QUEUE_CAPABILITY

        public static final org.apache.qpid.proton.amqp.Symbol TEMP_QUEUE_CAPABILITY
      • TEMP_TOPIC_CAPABILITY

        public static final org.apache.qpid.proton.amqp.Symbol TEMP_TOPIC_CAPABILITY
    • Constructor Detail

      • AmqpDestinationHelper

        public AmqpDestinationHelper()
    • Method Detail

      • getJmsDestination

        public static JmsDestination getJmsDestination​(AmqpJmsMessageFacade message,
                                                       JmsDestination consumerDestination)
        Decode the provided To address, type description, and consumer destination information such that an appropriate Destination object can be returned. If an address and type description is provided then this will be used to create the Destination. If the type information is missing, it will be derived from the consumer destination if present, or default to a queue destination if not. If the address is null then the consumer destination is returned, unless the useConsumerDestForTypeOnly flag is true, in which case null will be returned.
        Parameters:
        message - The message that holds the addressing information.
        consumerDestination - The destination that the consumer is subscribed to.
        Returns:
        a Destination object that describe the original address the message was sent to.
      • setToAnnotationFromDestination

        public static void setToAnnotationFromDestination​(JmsDestination destination,
                                                          org.apache.qpid.proton.amqp.messaging.MessageAnnotations annotations)
      • setReplyToAnnotationFromDestination

        public static void setReplyToAnnotationFromDestination​(JmsDestination destination,
                                                               org.apache.qpid.proton.amqp.messaging.MessageAnnotations annotations)
      • toTypeCapability

        public static org.apache.qpid.proton.amqp.Symbol toTypeCapability​(JmsDestination destination)
        Return the appropriate type capability to describe the given Destination.
        Parameters:
        destination - The Destination to examine for the destination type capability.
        Returns:
        the type capability, or null if the supplied destination is null or can't be classified