Examples of BindingImpl


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


    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

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

    }

    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

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

    }

    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

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

    }

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


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

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

    }

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


        int queueCount = routeMessage("a",0l);
        Assert.assertEquals("Message should not route to any queues", 0, queueCount);
View Full Code Here

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

    }

    public void testBindQueue() throws Exception
    {
        AMQQueue queue = createTestQueue(QUEUE_NAME, "queueOwner", false, null);
        BindingImpl binding = new BindingImpl(UUIDGenerator.generateRandomUUID(), ROUTING_KEY, queue,
                _exchange, _bindingArgs);
        DurableConfigurationStoreHelper.createBinding(_configStore, binding);

        reopenStore();

        Map<String,Object> map = new HashMap<String, Object>();
        map.put(org.apache.qpid.server.model.Binding.EXCHANGE, _exchange.getId().toString());
        map.put(org.apache.qpid.server.model.Binding.QUEUE, queue.getId().toString());
        map.put(org.apache.qpid.server.model.Binding.NAME, ROUTING_KEY);
        map.put(org.apache.qpid.server.model.Binding.ARGUMENTS,_bindingArgs);

        verify(_recoveryHandler).configuredObject(eq(binding.getId()), eq(BINDING),
                                                  argThat(new IgnoreCreatedByMatcher(map)));
    }
View Full Code Here

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

    }

    public void testUnbindQueue() throws Exception
    {
        AMQQueue queue = createTestQueue(QUEUE_NAME, "queueOwner", false, null);
        BindingImpl binding = new BindingImpl(UUIDGenerator.generateRandomUUID(), ROUTING_KEY, queue,
                _exchange, _bindingArgs);
        DurableConfigurationStoreHelper.createBinding(_configStore, binding);

        DurableConfigurationStoreHelper.removeBinding(_configStore, binding);
        reopenStore();
View Full Code Here

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

    {
        bindHeaders.put("A", "Value of A");

        matchHeaders.setString("A", "Value of A");

        BindingImpl b = new BindingImpl(null, getQueueName(), _queue, _exchange, bindHeaders);
        assertTrue(new HeadersBinding(b).matches(matchHeaders));
    }
View Full Code Here

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

        bindHeaders.put("A", "Value of A");

        matchHeaders.setString("A", "Value of A");
        matchHeaders.setString("B", "Value of B");

        BindingImpl b = new BindingImpl(null, getQueueName(), _queue, _exchange, bindHeaders);
        assertTrue(new HeadersBinding(b).matches(matchHeaders));
    }
View Full Code Here

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

    {
        bindHeaders.put("A", "Value of A");

        matchHeaders.setString("A", "Altered value of A");

        BindingImpl b = new BindingImpl(null, getQueueName(), _queue, _exchange, bindHeaders);
        assertFalse(new HeadersBinding(b).matches(matchHeaders));
    }
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.