Package org.apache.qpid.server.protocol

Examples of org.apache.qpid.server.protocol.InternalTestProtocolSession$DeliveryPair


    {
        _exchange = new TopicExchange();
        _vhost = ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHosts().iterator().next();
        _store = new MemoryMessageStore();
        _context = new StoreContext();
        _protocolSession = new InternalTestProtocolSession();
    }
View Full Code Here


        {
            currentMessage = new IncomingMessage(_virtualHost.getMessageStore().getNewMessageId(),
                                                 messageInfo,
                                                 new NonTransactionalContext(_virtualHost.getMessageStore(),
                                                                             new StoreContext(), null, null),
                                                 new InternalTestProtocolSession());
        }
        catch (AMQException e)
        {
            fail(e.getMessage());
        }
View Full Code Here

    @Override
    public void setUp() throws Exception
    {
        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);

        SubscriptionFactory factory = new SubscriptionFactoryImpl();

        _subscription = factory.createSubscription(_channelID, session, new AMQShortString("cTag"),
                                                   false, null, false,
View Full Code Here

    {
        super.setUp();
        BrokerTestHelper.setUp();
        _virtualHost = BrokerTestHelper.createVirtualHost(getTestName());
        _broker = BrokerTestHelper.createBrokerMock();
        _protocolSession = new InternalTestProtocolSession(_virtualHost, _broker)
        {
            @Override
            public void writeReturn(MessagePublishInfo messagePublishInfo,
                    ContentHeaderBody header,
                    MessageContentSource msgContent,
View Full Code Here

    public void testCompareTo() throws Exception
    {
        AMQChannel channel1 = new AMQChannel(_protocolSession, 1, _virtualHost.getMessageStore());

        // create a channel with the same channelId but on a different session
        AMQChannel channel2 = new AMQChannel(new InternalTestProtocolSession(_virtualHost, _broker), 1, _virtualHost.getMessageStore());
        assertFalse("Unexpected compare result", channel1.compareTo(channel2) == 0);
        assertEquals("Unexpected compare result", 0, channel1.compareTo(channel1));
    }
View Full Code Here

        defaultExchange = _virtualHost.getExchangeRegistry().getDefaultExchange();

        _virtualHost.getBindingFactory().addBinding(getName(), _queue, defaultExchange, null);

        _session = new InternalTestProtocolSession(_virtualHost);
        CurrentActor.set(_session.getLogActor());

        _channel = new MockChannel(_session, 1, _messageStore);

        _session.addChannel(_channel);
View Full Code Here

    {
        super.setUp();

        _defaultVhost = ApplicationRegistry.getInstance().getVirtualHostRegistry().getDefaultVirtualHost();

        _connection = new InternalTestProtocolSession(_defaultVhost);

        _config = new TopicDeletePolicyConfiguration();

        XMLConfiguration config = new XMLConfiguration();
View Full Code Here

        assertTrue(getQueue().getActiveConsumerCount() == 0);
        assertTrue(_queueMBean.getActiveConsumerCount() == 0);


        InternalTestProtocolSession protocolSession = new InternalTestProtocolSession(getVirtualHost());

        AMQChannel channel = new AMQChannel(protocolSession, 1, getMessageStore());
        protocolSession.addChannel(channel);

        Subscription subscription =
                SUBSCRIPTION_FACTORY.createSubscription(channel.getChannelId(), protocolSession, new AMQShortString("test"), false, null, false, channel.getCreditManager());

        getQueue().registerSubscription(subscription, false);
View Full Code Here

       
        assertTrue(_queue.getActiveConsumerCount() == 0);
        assertTrue(_queueMBean.getActiveConsumerCount() == 0);


        InternalTestProtocolSession protocolSession = new InternalTestProtocolSession();
        AMQChannel channel = new AMQChannel(protocolSession, 1, _messageStore);
        protocolSession.addChannel(channel);

        Subscription subscription =
                SUBSCRIPTION_FACTORY.createSubscription(channel.getChannelId(), protocolSession, new AMQShortString("test"), false, null, false, channel.getCreditManager());
       
        _queue.registerSubscription(subscription, false);
View Full Code Here

        _queue = AMQQueueFactory.createAMQQueueImpl(new AMQShortString("testQueue"), false, new AMQShortString("AMQueueMBeanTest"), false, _virtualHost,
                                                    null);
        _queueMBean = new AMQQueueMBean(_queue);

        _protocolSession = new InternalTestProtocolSession();
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.protocol.InternalTestProtocolSession$DeliveryPair

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.