Package org.apache.qpid.management.common.mbeans

Examples of org.apache.qpid.management.common.mbeans.ManagedExchange


        }

        try
        {
            //verify the DLE exchange exists, has the expected type, and a single binding for the DLQ
            ManagedExchange exchange = jmxUtils.getManagedExchange(QUEUE_WITH_DLQ_NAME + "_DLE");
            assertEquals("Wrong exchange type", "fanout", exchange.getExchangeType());
            TabularDataSupport bindings = (TabularDataSupport) exchange.bindings();
            assertEquals(1, bindings.size());
            for(Object o : bindings.values())
            {
                CompositeData binding = (CompositeData) o;
View Full Code Here


    public void testCreateExchangeAndUnregister() throws Exception
    {
        String exchangeName = getTestName();
        _managedBroker.createNewExchange(exchangeName, "topic", true);

        ManagedExchange exchange = _jmxUtils.getManagedExchange(exchangeName);
        assertNotNull("Exchange should exist", exchange);

        _managedBroker.unregisterExchange(exchangeName);
    }
View Full Code Here

     */
    public void testUnregisterOfAmqDirectExchangeDisallowed() throws Exception
    {
        String amqDirectExchangeName = "amq.direct";

        ManagedExchange amqDirectExchange = _jmxUtils.getManagedExchange(amqDirectExchangeName);
        assertNotNull("Exchange should exist", amqDirectExchange);
        try
        {
            _managedBroker.unregisterExchange(amqDirectExchangeName);
            fail("Exception not thrown");
View Full Code Here

    private void verifyDeclaredExchange(String exchangeName, boolean isAutoDelete, boolean isDurable) throws IOException
    {
        String exchangeObjectName = _jmxUtils.getExchangeObjectName("test", exchangeName);
        assertTrue("exchange should exist", _jmxUtils.doesManagedObjectExist(exchangeObjectName));
        ManagedExchange exchange = _jmxUtils.getManagedExchange(exchangeName);
        assertEquals(isAutoDelete, exchange.isAutoDelete());
        assertEquals(isDurable,exchange.isDurable());
    }
View Full Code Here

     * Tests queue creation/deletion also verifying the automatic binding to the default exchange.
     */
    public void testCreateQueueAndDeletion() throws Exception
    {
        final String queueName = getTestQueueName();
        final ManagedExchange defaultExchange = _jmxUtils.getManagedExchange(ExchangeDefaults.DEFAULT_EXCHANGE_NAME.asString());

        // Check that bind does not exist before queue creation
        assertFalse("Binding to " + queueName + " should not exist in default exchange before queue creation",
                     defaultExchange.bindings().containsKey(new String[] {queueName}));

        _managedBroker.createNewQueue(queueName, "testowner", true);

        // Ensure the queue exists
        assertNotNull("Queue object name expected to exist", _jmxUtils.getQueueObjectName(VIRTUAL_HOST, queueName));
        assertNotNull("Manager queue expected to be available", _jmxUtils.getManagedQueue(queueName));

        // Now verify that the default exchange has been bound.
        assertTrue("Binding to " + queueName + " should exist in default exchange after queue creation",
                     defaultExchange.bindings().containsKey(new String[] {queueName}));

        // Now delete the queue
        _managedBroker.deleteQueue(queueName);

        // Finally ensure that the binding has been removed.
        assertFalse("Binding to " + queueName + " should not exist in default exchange after queue deletion",
                defaultExchange.bindings().containsKey(new String[] {queueName}));
    }
View Full Code Here

    public void testCreateExchangeAndUnregister() throws Exception
    {
        String exchangeName = getTestName();
        _managedBroker.createNewExchange(exchangeName, "topic", true);

        ManagedExchange exchange = _jmxUtils.getManagedExchange(exchangeName);
        assertNotNull("Exchange should exist", exchange);

        _managedBroker.unregisterExchange(exchangeName);
    }
View Full Code Here

        catch (UnsupportedOperationException e)
        {
            // PASS
            assertEquals("'<<default>>' is a reserved exchange and can't be deleted", e.getMessage());
        }
        final ManagedExchange defaultExchange = _jmxUtils.getManagedExchange(defaultExchangeName);
        assertNotNull("Exchange should exist", defaultExchange);
    }
View Full Code Here

        //Remove any previous queue declares
        _monitor.markDiscardPoint();

        _jmxUtils.createQueue("test", getName(), null, false);

        ManagedExchange managedExchange = _jmxUtils.getManagedExchange("amq.direct");

        managedExchange.createNewBinding(getName(), getName());

        List<String> results = waitAndFindMatches("BND-1001");

        assertEquals("Unexpected number of bindings logged", 2, results.size());
View Full Code Here

        //Remove any previous queue declares
        _monitor.markDiscardPoint();

        _jmxUtils.createQueue("test", getName(), null, false);

        ManagedExchange managedExchange = _jmxUtils.getManagedExchange("amq.topic");

        managedExchange.createNewBinding(getName(), getName());

        List<String> results = waitAndFindMatches("BND-1001");

        assertEquals("Unexpected number of bindings logged", 2, results.size());
View Full Code Here

        //Remove any previous queue declares
        _monitor.markDiscardPoint();

        _jmxUtils.createQueue("test", getName(), null, false);

        ManagedExchange managedExchange = _jmxUtils.getManagedExchange("amq.fanout");

        managedExchange.createNewBinding(getName(), getName());

        List<String> results = waitAndFindMatches("BND-1001");

        assertEquals("Unexpected number of bindings logged", 2, results.size());
View Full Code Here

TOP

Related Classes of org.apache.qpid.management.common.mbeans.ManagedExchange

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.