Package org.apache.qpid.server.queue

Examples of org.apache.qpid.server.queue.MockAMQQueue


        policy.configure(_config);

        assertTrue("Config was not updated to delete Persistent topics",
                   _config.deletePersistent());

        MockAMQQueue queue = createOwnedQueue();

        queue.addBinding(new Binding(null, "bindingKey", queue, new TopicExchange(), null));

        policy.performPolicy(queue);

        assertTrue("Queue should be deleted", queue.isDeleted());
        assertTrue("Connection should be closed", _connection.isClosed());
    }
View Full Code Here


    {
        TopicDeletePolicy policy = new TopicDeletePolicy();
        // Explicity say we are not configuring the policy.
        policy.configure(null);

        MockAMQQueue queue = createOwnedQueue();

        queue.addBinding(new Binding(null, "bindingKey", queue, new TopicExchange(), null));

        policy.performPolicy(queue);

        assertFalse("Queue should not be deleted", queue.isDeleted());
        assertTrue("Connection should be closed", _connection.isClosed());
    }
View Full Code Here

    private MockAMQQueue _queue;
   
    protected void setUp()
    {
        _count++;
        _queue = new MockAMQQueue(getQueueName());
    }
View Full Code Here

        return queues;
    }

    private AMQQueue createTestAMQQueue(final boolean durable)
    {
        return new MockAMQQueue("mockQueue")
        {
            @Override
            public boolean isDurable()
            {
                return durable;
View Full Code Here

        return queues;
    }

    private AMQQueue createTestAMQQueue(final boolean durable)
    {
        return new MockAMQQueue("mockQueue")
        {
            @Override
            public boolean isDurable()
            {
                return durable;
View Full Code Here

    @Override
    protected void setUpWithConfig(ServerConfiguration serverConfig) throws AMQException
    {
        super.setUpWithConfig(serverConfig);

        MockAMQQueue queue = new MockAMQQueue(getName());

        queue.setVirtualHost(_session.getVirtualHost());

        _amqpActor = new QueueActor(queue, _rootLogger);
    }
View Full Code Here

        super.tearDown();
    }

    public void testACLManagerConfigurationPluginManager() throws Exception
    {
        AMQQueue queue = new MockAMQQueue("notyet");
        AMQQueue otherQueue = new MockAMQQueue("other");

        assertFalse(_authzManager.authoriseDelete(_session, queue));

        // This should only be denied if the config hasn't been correctly passed in
        assertTrue(_authzManager.authoriseDelete(_session, otherQueue));
View Full Code Here

    public void testConfigurePlugins() throws ConfigurationException
    {
        Configuration hostConfig = new PropertiesConfiguration();
        hostConfig.setProperty("queueDenier", "thisoneneither");
        _authzManager.configureHostPlugins(new SecurityConfiguration(hostConfig));
        AMQQueue queue = new MockAMQQueue("thisoneneither");
        assertFalse(_authzManager.authoriseDelete(_session, queue));
    }
View Full Code Here

        super.setUpWithConfig(serverConfig);


        MockSubscription mockSubscription = new MockSubscription();

        MockAMQQueue queue = new MockAMQQueue(getName());

        queue.setVirtualHost(_session.getVirtualHost());

        mockSubscription.setQueue(queue,false);

        _amqpActor = new SubscriptionActor(_rootLogger, mockSubscription);
    }
View Full Code Here

        _testVhost = ApplicationRegistry.getInstance().getVirtualHostRegistry().
                getVirtualHost("test");
        // Configure items for subjectCreation
        _routingKey = new AMQShortString("RoutingKey");
        _exchange = _testVhost.getExchangeRegistry().getDefaultExchange();
        _queue = new MockAMQQueue("BindingLogSubjectTest");
        ((MockAMQQueue) _queue).setVirtualHost(_testVhost);

        _subject = new BindingLogSubject(_routingKey, _exchange, _queue);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.queue.MockAMQQueue

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.