Package org.apache.qpid.server.queue

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


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

        MockAMQQueue queue = createOwnedQueue();

        queue.addBinding(new Binding(null, 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


        _session = new MockProtocolSession(new TestableMemoryMessageStore());
    }
   
    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

        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

        super.setUp();

        _testVhost = BrokerTestHelper.createVirtualHost("test");
        _routingKey = new AMQShortString("RoutingKey");
        _exchange = _testVhost.getExchangeRegistry().getDefaultExchange();
        _queue = new MockAMQQueue("BindingLogSubjectTest");
        ((MockAMQQueue) _queue).setVirtualHost(_testVhost);

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

        super.setUp();

        InternalTestProtocolSession session = BrokerTestHelper.createSession();
        _testVhost = session.getVirtualHost();

        _queue = new MockAMQQueue("SubscriptionLogSubjectTest");
        ((MockAMQQueue) _queue).setVirtualHost(_testVhost);

        AMQChannel channel = new AMQChannel(session, _channelID, _testVhost.getMessageStore());

        session.addChannel(channel);
View Full Code Here

    {
        super.setUp();

        _testVhost = BrokerTestHelper.createVirtualHost("test");

        _queue = new MockAMQQueue("QueueLogSubjectTest");
        ((MockAMQQueue) _queue).setVirtualHost(_testVhost);

        _subject = new QueueLogSubject(_queue);
    }
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

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.