Package org.apache.qpid.framing

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


    public void assertReceivedReturnedMessageWithLongExceptionMessage(Message message, AMQQueue queue)
    {
        JMSException exception = getReceivedException();
        assertNoRouteException(exception, message);
        AMQShortString exchangeName = queue.getExchangeName();
        String expectedMessage = "Error: No Route for message [Exchange: " + exchangeName.asString().substring(0, 220) + "...";
        assertTrue("Unexpected exception message: " + exception.getMessage(), exception.getMessage().contains(expectedMessage));
    }

    public void assertNoRouteExceptionWithReturnedMessage(
            JMSException exception, Message message, String intendedQueueName)
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 (messageMetaData != null)
        {
            AMQShortString routingKey = messageMetaData.getMessagePublishInfo().getRoutingKey();
            if (routingKey != null)
            {
                return routingKey.asString();
            }
        }
        return null;
    }
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

                try
                {
                    AMQTopic t = new AMQTopic(qpidTopic.getAddress());
                    AMQShortString queueName = getDurableTopicQueueName(subscriptionName, connection);
                    // link is never null if dest was created using an address string.
                    t.getLink().setName(queueName.asString());              
                    t.getLink().getSubscriptionQueue().setAutoDelete(false);
                    t.getLink().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

                try
                {
                    AMQTopic t = new AMQTopic(qpidTopic.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

                    // 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

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.