Class AmqpDestinationHelper

java.lang.Object
org.apache.qpid.jms.provider.amqp.message.AmqpDestinationHelper

public class AmqpDestinationHelper extends 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 Details

    • 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_TYPE

      public static final byte QUEUE_TYPE
      See Also:
    • TOPIC_TYPE

      public static final byte TOPIC_TYPE
      See Also:
    • TEMP_QUEUE_TYPE

      public static final byte TEMP_QUEUE_TYPE
      See Also:
    • TEMP_TOPIC_TYPE

      public static final byte TEMP_TOPIC_TYPE
      See Also:
    • 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
    • UNKNOWN_TYPE

      public static final byte UNKNOWN_TYPE
      See Also:
  • Constructor Details

    • AmqpDestinationHelper

      public AmqpDestinationHelper()
  • Method Details

    • 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.
    • getJmsReplyTo

      public static JmsDestination getJmsReplyTo(AmqpJmsMessageFacade message, JmsDestination consumerDestination)
    • setToAddressFromDestination

      public static void setToAddressFromDestination(AmqpJmsMessageFacade message, JmsDestination destination)
    • setReplyToAddressFromDestination

      public static void setReplyToAddressFromDestination(AmqpJmsMessageFacade message, JmsDestination destination)
    • 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)
    • getDestinationAddress

      public static String getDestinationAddress(JmsDestination destination, AmqpConnection connection)
    • 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