in qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpDestinationHelper.java [125:159]
private static JmsDestination createDestination(String address, byte typeByte, JmsDestination consumerDestination, boolean useConsumerDestForTypeOnly) {
if (address == null) {
return useConsumerDestForTypeOnly ? null : consumerDestination;
}
if (typeByte != UNKNOWN_TYPE) {
switch (typeByte) {
case QUEUE_TYPE:
return new JmsQueue(address);
case TOPIC_TYPE:
return new JmsTopic(address);
case TEMP_QUEUE_TYPE:
return new JmsTemporaryQueue(address);
case TEMP_TOPIC_TYPE:
return new JmsTemporaryTopic(address);
}
}
if (consumerDestination.isQueue()) {
if (consumerDestination.isTemporary()) {
return new JmsTemporaryQueue(address);
} else {
return new JmsQueue(address);
}
} else if (consumerDestination.isTopic()) {
if (consumerDestination.isTemporary()) {
return new JmsTemporaryTopic(address);
} else {
return new JmsTopic(address);
}
}
// fall back to a Queue Destination since we need a real JMS destination
return new JmsQueue(address);
}