Apache.NMS.ActiveMQ.Commands.ActiveMQDestination.CreateDestination C# (CSharp) Method

CreateDestination() public static method

Create a Destination
public static CreateDestination ( int type, String pyhsicalName ) : ActiveMQDestination
type int
pyhsicalName String
return ActiveMQDestination
        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;
        }

Same methods

ActiveMQDestination::CreateDestination ( String name ) : ActiveMQDestination