Package org.apache.activemq.command

Examples of org.apache.activemq.command.ActiveMQTempQueue


    }

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


        case QUEUE:
            return new ActiveMQQueue(name);
        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

        Object header = message.getHeader("JMSDestination");
        isValidDestination(header);
    }

    protected void isValidDestination(Object header) {
        ActiveMQTempQueue destination = assertIsInstanceOf(ActiveMQTempQueue.class, header);
        LOG.info("Received message has a temporary queue: " + destination);
    }
View Full Code Here

        ConnectionId id = new ConnectionId(new IdGenerator().generateId());
        DestinationMap map = new DestinationMap();
        Object value = new Object();
        int count = 1000;
        for (int i = 0; i < count; i++) {
            ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
            map.put(queue, value);
        }
        for (int i = 0; i < count; i++) {
            ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
            map.remove(queue, value);
            Set set = map.get(queue);
            assertTrue(set.isEmpty());
        }
    }
View Full Code Here

        Object header = message.getHeader("JMSDestination");
        isValidDestination(header);
    }

    protected void isValidDestination(Object header) {
        ActiveMQTempQueue destination = assertIsInstanceOf(ActiveMQTempQueue.class, header);
        LOG.info("Received message has a temporary queue: " + destination);
    }
View Full Code Here

        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);
            tempDestinationAmqToStompMap.put(rc.getQualifiedName(), name);
        }
View Full Code Here

     * 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);
View Full Code Here

public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport {

    public static final ActiveMQTempQueueTest SINGLETON = new ActiveMQTempQueueTest();

    public Object createObject() throws Exception {
        ActiveMQTempQueue info = new ActiveMQTempQueue();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ActiveMQTempQueue info = (ActiveMQTempQueue)object;

    }
View Full Code Here

public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport {

    public static final ActiveMQTempQueueTest SINGLETON = new ActiveMQTempQueueTest();

    public Object createObject() throws Exception {
        ActiveMQTempQueue info = new ActiveMQTempQueue();
        populateObject(info);
        return info;
    }
View Full Code Here

TOP

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

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.