Java Code Examples for org.apache.activemq.command.ActiveMQDestination#TEMP_TOPIC_TYPE

The following examples show how to use org.apache.activemq.command.ActiveMQDestination#TEMP_TOPIC_TYPE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BasicOpenWireTest.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
public ActiveMQDestination createDestination(Session session, byte type, String name) throws Exception {
   if (name == null) {
      return createDestination(session, type);
   }

   switch (type) {
      case ActiveMQDestination.QUEUE_TYPE:
         makeSureCoreQueueExist(name);
         return (ActiveMQDestination) session.createQueue(name);
      case ActiveMQDestination.TOPIC_TYPE:
         return (ActiveMQDestination) session.createTopic(name);
      case ActiveMQDestination.TEMP_QUEUE_TYPE:
         return (ActiveMQDestination) session.createTemporaryQueue();
      case ActiveMQDestination.TEMP_TOPIC_TYPE:
         return (ActiveMQDestination) session.createTemporaryTopic();
      default:
         throw new IllegalArgumentException("type: " + type);
   }
}
 
Example 2
Source File: JmsTestSupport.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
protected ActiveMQDestination createDestination(Session session, byte type) throws JMSException {
   String testMethod = getName();
   if (testMethod.indexOf(" ") > 0) {
      testMethod = testMethod.substring(0, testMethod.indexOf(" "));
   }
   String name = "TEST." + getClass().getName() + "." + testMethod + "." + TEST_COUNTER.getAndIncrement();
   switch (type) {
      case ActiveMQDestination.QUEUE_TYPE:
         return (ActiveMQDestination) session.createQueue(name);
      case ActiveMQDestination.TOPIC_TYPE:
         return (ActiveMQDestination) session.createTopic(name);
      case ActiveMQDestination.TEMP_QUEUE_TYPE:
         return (ActiveMQDestination) session.createTemporaryQueue();
      case ActiveMQDestination.TEMP_TOPIC_TYPE:
         return (ActiveMQDestination) session.createTemporaryTopic();
      default:
         throw new IllegalArgumentException("type: " + type);
   }
}
 
Example 3
Source File: BasicOpenWireTest.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
public ActiveMQDestination createDestination(Session session, byte type) throws JMSException {
   switch (type) {
      case ActiveMQDestination.QUEUE_TYPE:
         return (ActiveMQDestination) session.createQueue(queueName);
      case ActiveMQDestination.TOPIC_TYPE:
         return (ActiveMQDestination) session.createTopic(topicName);
      case ActiveMQDestination.TEMP_QUEUE_TYPE:
         return (ActiveMQDestination) session.createTemporaryQueue();
      case ActiveMQDestination.TEMP_TOPIC_TYPE:
         return (ActiveMQDestination) session.createTemporaryTopic();
      default:
         throw new IllegalArgumentException("type: " + type);
   }
}
 
Example 4
Source File: BasicOpenWireTest.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
protected ActiveMQDestination createDestination2(Session session, byte type) throws JMSException {
   switch (type) {
      case ActiveMQDestination.QUEUE_TYPE:
         return (ActiveMQDestination) session.createQueue(queueName2);
      case ActiveMQDestination.TOPIC_TYPE:
         return (ActiveMQDestination) session.createTopic(topicName2);
      case ActiveMQDestination.TEMP_QUEUE_TYPE:
         return (ActiveMQDestination) session.createTemporaryQueue();
      case ActiveMQDestination.TEMP_TOPIC_TYPE:
         return (ActiveMQDestination) session.createTemporaryTopic();
      default:
         throw new IllegalArgumentException("type: " + type);
   }
}