public static ActiveMQDestination CreateDestination(int type, String pyhsicalName)
{
ActiveMQDestination result = null;
if(pyhsicalName == null)
{
return null;
}
else switch(type)
{
case ACTIVEMQ_TOPIC:
result = new ActiveMQTopic(pyhsicalName);
break;
case ACTIVEMQ_TEMPORARY_TOPIC:
result = new ActiveMQTempTopic(pyhsicalName);
break;
case ACTIVEMQ_QUEUE:
result = new ActiveMQQueue(pyhsicalName);
break;
default:
result = new ActiveMQTempQueue(pyhsicalName);
break;
}
return result;
}