Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.AMQShortString.asString()


        final QueueRegistry qReg = _vHost.getQueueRegistry();

        assertNull("The queue should not yet exist", qReg.getQueue(queueName));

        final ManagedBroker mbean = new AMQBrokerManagerMBean((VirtualHostImpl.VirtualHostMBean) _vHost.getManagedObject());
        mbean.createNewQueue(queueName.asString(), "test", false, args);

        final AMQQueue createdQueue = qReg.getQueue(queueName);
        assertNotNull("The queue was not registered as expected", createdQueue);
        assertEquals("Unexpected maximum delivery count", 5, createdQueue.getMaximumDeliveryCount());
    }
View Full Code Here


        QueueRegistry qReg = _vHost.getQueueRegistry();

        assertNull("The queue should not yet exist", qReg.getQueue(queueName));

        ManagedBroker mbean = new AMQBrokerManagerMBean((VirtualHostImpl.VirtualHostMBean) _vHost.getManagedObject());
        mbean.createNewQueue(queueName.asString(), "test", false, args);

        AMQQueue queue = qReg.getQueue(queueName);
        assertEquals("Queue is not a priorty queue", AMQPriorityQueue.class, queue.getClass());
        assertEquals("Number of priorities supported was not as expected", numPriorities, ((AMQPriorityQueue)queue).getPriorities());
    }
View Full Code Here

            try
            {
                AMQTopic t = new AMQTopic(topic.getAddress());
                AMQShortString queueName = getDurableTopicQueueName(subscriptionName, connection);
                // link is never null if dest was created using an address string.
                t.getLink().setName(queueName.asString());              
                t.getSourceNode().setAutoDelete(false);
                t.getSourceNode().setDurable(true);
               
                // The legacy fields are also populated just in case.
                t.setQueueName(queueName);
View Full Code Here

                {
                    AMQBindingURL burl = new AMQBindingURL(origReplyToString);
                    AMQShortString routingKey = burl.getRoutingKey();
                    if(routingKey != null)
                    {
                        replyTo.setRoutingKey(routingKey.asString());
                    }

                    AMQShortString exchangeName = burl.getExchangeName();
                    if(exchangeName != null)
                    {
View Full Code Here

                    }

                    AMQShortString exchangeName = burl.getExchangeName();
                    if(exchangeName != null)
                    {
                        replyTo.setExchange(exchangeName.asString());
                    }
                }
                catch (URISyntaxException e)
                {
                    replyTo.setRoutingKey(origReplyToString);
View Full Code Here

                    // if the queue is bound to the exchange but NOT for this topic and selector, then the JMS spec
                    // says we must trash the subscription.
                    boolean isQueueBound = isQueueBound(dest.getExchangeName(), dest.getAMQQueueName());
                    boolean isQueueBoundForTopicAndSelector =
                                isQueueBound(dest.getExchangeName().asString(), dest.getAMQQueueName().asString(), topicName.asString(), args);

                    if (isQueueBound && !isQueueBoundForTopicAndSelector)
                    {
                        deleteQueue(dest.getAMQQueueName());
                    }
View Full Code Here

                    // if the queue is bound to the exchange but NOT for this topic and selector, then the JMS spec
                    // says we must trash the subscription.
                    boolean isQueueBound = isQueueBound(dest.getExchangeName(), dest.getAMQQueueName());
                    boolean isQueueBoundForTopicAndSelector =
                                isQueueBound(dest.getExchangeName().asString(), dest.getAMQQueueName().asString(), topicName.asString(), args);

                    if (isQueueBound && !isQueueBoundForTopicAndSelector)
                    {
                        deleteQueue(dest.getAMQQueueName());
                    }
View Full Code Here

        if (messageMetaData != null)
        {
            AMQShortString routingKey = messageMetaData.getMessagePublishInfo().getRoutingKey();
            if (routingKey != null)
            {
                return routingKey.asString();
            }
        }
        return null;
    }
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.