Examples of AMQBindingURL


Examples of org.apache.qpid.url.AMQBindingURL

    public void testExchangeInternalOptionPresent() throws URISyntaxException
    {
        String url = "exchangeClass://exchangeName/Destination/Queue?" + BindingURL.OPTION_EXCHANGE_INTERNAL + "='true'";

        AMQBindingURL burl = new AMQBindingURL(url);

        assertTrue(url.equals(burl.toString()));

        assertEquals("true", burl.getOption(BindingURL.OPTION_EXCHANGE_INTERNAL));
        assertNull(burl.getOption(BindingURL.OPTION_EXCHANGE_AUTODELETE));
        assertNull(burl.getOption(BindingURL.OPTION_EXCHANGE_DURABLE));

        class MyTestAMQDestination extends AMQDestination
        {
            public MyTestAMQDestination(BindingURL url)
            {
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

    public void testRejectBehaviourPresent() throws URISyntaxException
    {
        String url = "exchangeClass://exchangeName/Destination/Queue?rejectbehaviour='server'";

        AMQBindingURL burl = new AMQBindingURL(url);

        assertTrue(url.equals(burl.toString()));
        assertTrue(burl.getExchangeClass().equalsCharSequence("exchangeClass"));
        assertTrue(burl.getExchangeName().equalsCharSequence("exchangeName"));
        assertTrue(burl.getDestinationName().equalsCharSequence("Destination"));
        assertTrue(burl.getQueueName().equalsCharSequence("Queue"));

        //check that the MaxDeliveryCount property has the right value
        assertEquals("server",burl.getOption(BindingURL.OPTION_REJECT_BEHAVIOUR));

        //check that the MaxDeliveryCount value is correctly returned from an AMQDestination
        class MyTestAMQDestination extends AMQDestination
        {
            public MyTestAMQDestination(BindingURL url)
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

    public void testRejectBehaviourNotPresent() throws URISyntaxException
    {
        String url = "exchangeClass://exchangeName/Destination/Queue";

        AMQBindingURL burl = new AMQBindingURL(url);

        assertTrue(url.equals(burl.toString()));

        assertTrue(burl.getExchangeClass().equalsCharSequence("exchangeClass"));
        assertTrue(burl.getExchangeName().equalsCharSequence("exchangeName"));
        assertTrue(burl.getDestinationName().equalsCharSequence("Destination"));
        assertTrue(burl.getQueueName().equalsCharSequence("Queue"));

        class MyTestAMQDestination extends AMQDestination
        {
            public MyTestAMQDestination(BindingURL url)
            {
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

        assertNull("Reject behaviour is unexpected", dest.getRejectBehaviour());
    }

    public void testBindingUrlWithoutDestinationAndQueueName() throws Exception
    {
        AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic//?routingkey='testTopic'");
        assertEquals("Unexpected queue name", AMQShortString.EMPTY_STRING, bindingURL.getQueueName());
        assertEquals("Unexpected destination", AMQShortString.EMPTY_STRING, bindingURL.getDestinationName());
        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }

    public void testBindingUrlWithoutDestinationAndMissedQueueName() throws Exception
    {
        AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic/?routingkey='testTopic'");
        assertEquals("Unexpected queue name", AMQShortString.EMPTY_STRING, bindingURL.getQueueName());
        assertEquals("Unexpected destination", AMQShortString.EMPTY_STRING, bindingURL.getDestinationName());
        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }

    public void testBindingUrlWithoutQueueName() throws Exception
    {
        AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic/destination/?routingkey='testTopic'");
        assertEquals("Unexpected queue name", AMQShortString.EMPTY_STRING, bindingURL.getQueueName());
        assertEquals("Unexpected destination", AMQShortString.valueOf("destination"), bindingURL.getDestinationName());
        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }

    public void testBindingUrlWithQueueNameWithoutDestination() throws Exception
    {
        AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic//queueName?routingkey='testTopic'");
        assertEquals("Unexpected queue name", AMQShortString.valueOf("queueName"), bindingURL.getQueueName());
        assertEquals("Unexpected destination", AMQShortString.EMPTY_STRING, bindingURL.getDestinationName());
        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }

    public void testBindingUrlWithQueueNameAndDestination() throws Exception
    {
        AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic/destination/queueName?routingkey='testTopic'");
        assertEquals("Unexpected queue name", AMQShortString.valueOf("queueName"), bindingURL.getQueueName());
        assertEquals("Unexpected destination", AMQShortString.valueOf("destination"), bindingURL.getDestinationName());
        assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

    public void testFullURL() throws URISyntaxException
    {

        String url = "exchange.Class://exchangeName/Destination/Queue";

        AMQBindingURL dest = new AMQBindingURL(url);

        assertTrue(url.equals(dest.toString()));

        assertTrue(dest.getExchangeClass().equalsCharSequence("exchange.Class"));
        assertTrue(dest.getExchangeName().equalsCharSequence("exchangeName"));
        assertTrue(dest.getDestinationName().equalsCharSequence("Destination"));
        assertTrue(dest.getQueueName().equalsCharSequence("Queue"));
    }
View Full Code Here

Examples of org.apache.qpid.url.AMQBindingURL

    public void testQueue() throws URISyntaxException
    {

        String url = "exchangeClass://exchangeName//Queue";

        AMQBindingURL dest = new AMQBindingURL(url);

        assertTrue(url.equals(dest.toString()));

        assertTrue(dest.getExchangeClass().equalsCharSequence("exchangeClass"));
        assertTrue(dest.getExchangeName().equalsCharSequence("exchangeName"));
        assertTrue(dest.getDestinationName().equalsCharSequence(""));
        assertTrue(dest.getQueueName().equalsCharSequence("Queue"));
    }
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.