Examples of ActiveMQTempTopic


Examples of org.apache.activemq.command.ActiveMQTempTopic

    }

    public ActiveMQDestination createTempTopic(String name) {
        ActiveMQDestination rc = tempDestinations.get(name);
        if( rc == null ) {
            rc = new ActiveMQTempTopic(connectionId, tempDestinationGenerator.getNextSequenceId());
            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
            tempDestinations.put(name, rc);
            tempDestinationAmqToStompMap.put(rc.getQualifiedName(), name);
        }
        return rc;
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

    protected ActiveMQTempDestination createTempDestination(boolean topic) throws JMSException {

        // Check if Destination info is of temporary type.
        ActiveMQTempDestination dest;
        if (topic) {
            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        } else {
            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        }

        DestinationInfo info = new DestinationInfo();
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

     * @since 1.1
     */
    public Topic createTopic(String topicName) throws JMSException {
        checkClosed();
        if (topicName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) {
            return new ActiveMQTempTopic(topicName);
        }
        return new ActiveMQTopic(topicName);
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

        case TOPIC:
            return new ActiveMQTopic(name);
        case TEMP_QUEUE:
            return new ActiveMQTempQueue(name);
        case TEMP_TOPIC:
            return new ActiveMQTempTopic(name);
        default:   
            throw new IllegalArgumentException("Not in the valid destination format");
        }
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

        case TOPIC:
            return new ActiveMQTopic(name);
        case TEMP_QUEUE:
            return new ActiveMQTempQueue(name);
        case TEMP_TOPIC:
            return new ActiveMQTempTopic(name);
        default:
            throw new IllegalArgumentException("Not in the valid destination format");
        }
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

     * Tests transforming destinations into ActiveMQ's destination implementation.
     */
    public void testTransformDestination() throws Exception {
      assertTrue("Transforming a TempQueue destination to an ActiveMQTempQueue", ActiveMQMessageTransformation.transformDestination((TemporaryQueue)new ActiveMQTempQueue()) instanceof ActiveMQTempQueue);
     
      assertTrue("Transforming a TempTopic destination to an ActiveMQTempTopic", ActiveMQMessageTransformation.transformDestination((TemporaryTopic)new ActiveMQTempTopic()) instanceof ActiveMQTempTopic);
     
      assertTrue("Transforming a Queue destination to an ActiveMQQueue", ActiveMQMessageTransformation.transformDestination((Queue)new ActiveMQQueue()) instanceof ActiveMQQueue);
     
      assertTrue("Transforming a Topic destination to an ActiveMQTopic", ActiveMQMessageTransformation.transformDestination((Topic)new ActiveMQTopic()) instanceof ActiveMQTopic);
     
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

    public void initCombosForTestDesintaionMarshaling() {
        addCombinationValues("destination", new Object[]{
                new ActiveMQQueue("TEST"),
                new ActiveMQTopic("TEST"),
                new ActiveMQTempQueue("TEST:1"),
                new ActiveMQTempTopic("TEST:1"),
                new ActiveMQQueue("TEST?option=value"),
                new ActiveMQTopic("TEST?option=value"),
                new ActiveMQTempQueue("TEST:1?option=value"),
                new ActiveMQTempTopic("TEST:1?option=value"),
        });
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

    public void initCombosForTestDesintaionOptions() {
        addCombinationValues("destination", new Object[]{
                new ActiveMQQueue("TEST?k1=v1&k2=v2"),
                new ActiveMQTopic("TEST?k1=v1&k2=v2"),
                new ActiveMQTempQueue("TEST:1?k1=v1&k2=v2"),
                new ActiveMQTempTopic("TEST:1?k1=v1&k2=v2"),
        });
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

           
        case TEMPORARY_QUEUE:
            return new ActiveMQTempQueue(physicalName);

        case TEMPORARY_TOPIC:
            return new ActiveMQTempTopic(physicalName);

        default:
            throw new JMSException("Invalid destinationType: " + destinationType);
        }
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQTempTopic

    protected ActiveMQTempDestination createTempDestination(boolean topic) throws JMSException {
       
        // Check if Destination info is of temporary type.
        ActiveMQTempDestination dest;
        if( topic ) {
            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        } else {
            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
        }
       
        DestinationInfo info = new DestinationInfo();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.