Class AmqpDestinationHelper
- java.lang.Object
-
- org.apache.qpid.jms.provider.amqp.message.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 Summary
Fields Modifier and Type Field Description static org.apache.qpid.proton.amqp.Symbol
JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL
static org.apache.qpid.proton.amqp.Symbol
JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL
static org.apache.qpid.proton.amqp.Symbol
QUEUE_CAPABILITY
static byte
QUEUE_TYPE
static org.apache.qpid.proton.amqp.Symbol
TEMP_QUEUE_CAPABILITY
static byte
TEMP_QUEUE_TYPE
static org.apache.qpid.proton.amqp.Symbol
TEMP_TOPIC_CAPABILITY
static byte
TEMP_TOPIC_TYPE
static org.apache.qpid.proton.amqp.Symbol
TOPIC_CAPABILITY
static byte
TOPIC_TYPE
static byte
UNKNOWN_TYPE
-
Constructor Summary
Constructors Constructor Description AmqpDestinationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getDestinationAddress(JmsDestination destination, AmqpConnection connection)
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.static JmsDestination
getJmsReplyTo(AmqpJmsMessageFacade message, JmsDestination consumerDestination)
static void
setReplyToAddressFromDestination(AmqpJmsMessageFacade message, JmsDestination destination)
static void
setReplyToAnnotationFromDestination(JmsDestination destination, org.apache.qpid.proton.amqp.messaging.MessageAnnotations annotations)
static void
setToAddressFromDestination(AmqpJmsMessageFacade message, JmsDestination destination)
static void
setToAnnotationFromDestination(JmsDestination destination, org.apache.qpid.proton.amqp.messaging.MessageAnnotations annotations)
static org.apache.qpid.proton.amqp.Symbol
toTypeCapability(JmsDestination destination)
Return the appropriate type capability to describe the given Destination.
-
-
-
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_TYPE
public static final byte QUEUE_TYPE
- See Also:
- Constant Field Values
-
TOPIC_TYPE
public static final byte TOPIC_TYPE
- See Also:
- Constant Field Values
-
TEMP_QUEUE_TYPE
public static final byte TEMP_QUEUE_TYPE
- See Also:
- Constant Field Values
-
TEMP_TOPIC_TYPE
public static final byte TEMP_TOPIC_TYPE
- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
-
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.
-
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 java.lang.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
-
-