Package org.apache.qpid.server.binding

Examples of org.apache.qpid.server.binding.BindingImpl


                        _exchange.isBound(_routingKey));
        assertTrue("Queue was not bound to key",
                    _exchange.isBound(_routingKey,_queue));
        assertEquals("Exchange binding count", 1,
                     _queue.getBindings().size());
        final BindingImpl firstBinding = _queue.getBindings().iterator().next();
        assertEquals("Wrong exchange bound", _routingKey,
                     firstBinding.getBindingKey());
        assertEquals("Wrong exchange bound", _exchange,
                     firstBinding.getExchange());

        _exchange.deleteBinding(_routingKey, _queue);
        assertFalse("Routing key was still bound",
                _exchange.isBound(_routingKey));
View Full Code Here


    }

    public void testNoRoute() throws Exception
    {
        AMQQueue<?> queue = createQueue("a*#b");
        _exchange.registerQueue(new BindingImpl(null, "a.*.#.b",queue, _exchange, null));


        routeMessage("a.b", 0l);

        Assert.assertEquals(0, queue.getQueueDepthMessages());
View Full Code Here

    }

    public void testDirectMatch() throws Exception
    {
        AMQQueue<?> queue = createQueue("ab");
        _exchange.registerQueue(new BindingImpl(null, "a.b",queue, _exchange, null));


        routeMessage("a.b",0l);

        Assert.assertEquals(1, queue.getQueueDepthMessages());
View Full Code Here


    public void testStarMatch() throws Exception
    {
        AMQQueue<?> queue = createQueue("a*");
        _exchange.registerQueue(new BindingImpl(null, "a.*",queue, _exchange, null));


        routeMessage("a.b",0l);

        Assert.assertEquals(1, queue.getQueueDepthMessages());
View Full Code Here

    }

    public void testHashMatch() throws Exception
    {
        AMQQueue<?> queue = createQueue("a#");
        _exchange.registerQueue(new BindingImpl(null, "a.#",queue, _exchange, null));


        routeMessage("a.b.c",0l);

        Assert.assertEquals(1, queue.getQueueDepthMessages());
View Full Code Here


    public void testMidHash() throws Exception
    {
        AMQQueue<?> queue = createQueue("a");
        _exchange.registerQueue(new BindingImpl(null, "a.*.#.b",queue, _exchange, null));

        routeMessage("a.c.d.b",0l);

        Assert.assertEquals(1, queue.getQueueDepthMessages());

View Full Code Here

    }

    public void testMatchAfterHash() throws Exception
    {
        AMQQueue<?> queue = createQueue("a#");
        _exchange.registerQueue(new BindingImpl(null, "a.*.#.b.c",queue, _exchange, null));


        int queueCount = routeMessage("a.c.b.b",0l);
        Assert.assertEquals("Message should not route to any queues", 0, queueCount);

View Full Code Here


    public void testHashAfterHash() throws Exception
    {
        AMQQueue<?> queue = createQueue("a#");
        _exchange.registerQueue(new BindingImpl(null, "a.*.#.b.c.#.d",queue, _exchange, null));

        int queueCount = routeMessage("a.c.b.b.c",0l);
        Assert.assertEquals("Message should not route to any queues", 0, queueCount);

        Assert.assertEquals(0, queue.getQueueDepthMessages());
View Full Code Here

    }

    public void testHashHash() throws Exception
    {
        AMQQueue<?> queue = createQueue("a#");
        _exchange.registerQueue(new BindingImpl(null, "a.#.*.#.d",queue, _exchange, null));

        int queueCount = routeMessage("a.c.b.b.c",0l);
        Assert.assertEquals("Message should not route to any queues", 0, queueCount);

        Assert.assertEquals(0, queue.getQueueDepthMessages());
View Full Code Here

    }

    public void testSubMatchFails() throws Exception
    {
        AMQQueue<?> queue = createQueue("a");
        _exchange.registerQueue(new BindingImpl(null, "a.b.c.d",queue, _exchange, null));

        int queueCount = routeMessage("a.b.c",0l);
        Assert.assertEquals("Message should not route to any queues", 0, queueCount);

        Assert.assertEquals(0, queue.getQueueDepthMessages());
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.binding.BindingImpl

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.