Package org.apache.activemq.command

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


        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

    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

     * @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

    public ActiveMQDestination createTempDestination(String name, boolean topic) {
        ActiveMQDestination rc = tempDestinations.get(name);
        if( rc == null ) {
            if (topic) {
                rc = new ActiveMQTempTopic(connectionId, tempDestinationGenerator.getNextSequenceId());
            } else {
                rc = new ActiveMQTempQueue(connectionId, tempDestinationGenerator.getNextSequenceId());
            }
            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
            tempDestinations.put(name, rc);
View Full Code Here

    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

        assertPermString("topic:myTopic:create", perms);
    }

    @Test
    public void testGetPermissionsWithTemporaryTopic() {
        ActiveMQTempTopic topic = new ActiveMQTempTopic("myTempTopic");
        DestinationAction action = new DestinationAction(new ConnectionContext(), topic, "remove");
        Collection<Permission> perms = resolver.getPermissions(action);
        assertPermString("temp-topic:myTempTopic:remove", perms);
    }
View Full Code Here

    public ActiveMQDestination createTempDestination(String name, boolean topic) {
        ActiveMQDestination rc = tempDestinations.get(name);
        if( rc == null ) {
            if (topic) {
                rc = new ActiveMQTempTopic(connectionId, tempDestinationGenerator.getNextSequenceId());
            } else {
                rc = new ActiveMQTempQueue(connectionId, tempDestinationGenerator.getNextSequenceId());
            }
            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
            tempDestinations.put(name, rc);
View Full Code Here

        }
        if (kind == TemporaryQueue.class) {
            return kind.cast(new ActiveMQTempQueue(destinationName));
        }
        if (kind == TemporaryTopic.class) {
            return kind.cast(new ActiveMQTempTopic(destinationName));
        }

        return kind.cast(ActiveMQDestination.createDestination(name, ActiveMQDestination.QUEUE_TYPE));
    }
View Full Code Here

                final ActiveMQMessage message = (ActiveMQMessage) getInboundTransformer().transform(em);

                // TODO - we need to cast TempTopic to TempQueue as we internally are using temp queues for all dynamic destinations
                // we need to figure out how to support both queues and topics
                if (message.getJMSReplyTo() != null && message.getJMSReplyTo() instanceof ActiveMQTempTopic) {
                    ActiveMQTempTopic tempTopic = (ActiveMQTempTopic)message.getJMSReplyTo();
                    message.setJMSReplyTo(new ActiveMQTempQueue(tempTopic.getPhysicalName()));
                }
                current = null;

                if (destination != null) {
                    message.setJMSDestination(destination);
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.ActiveMQTempTopic

Copyright © 2018 www.massapicom. 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.