Package org.apache.qpid.server.protocol

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


    public void setUp() throws Exception
    {
        super.setUp();
        _virtualHost = ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHost("test");
        _messageStore = new TestMemoryMessageStore();
        _protocolSession = new InternalTestProtocolSession(_virtualHost);
        _channel = new AMQChannel(_protocolSession,5, _messageStore /*dont need exchange registry*/);

        _protocolSession.addChannel(_channel);

        _queue = AMQQueueFactory.createAMQQueueImpl(new AMQShortString("myQ"), false, new AMQShortString("guest"), true, false,
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

     *
     * @throws Exception
     */
    public void testMessageCountAlert() throws Exception
    {
        setSession(new InternalTestProtocolSession(getVirtualHost()));
        AMQChannel channel = new AMQChannel(getSession(), 2, getMessageStore());
        getSession().addChannel(channel);

        setQueue(AMQQueueFactory.createAMQQueueImpl(new AMQShortString("testQueue1"), false, new AMQShortString("AMQueueAlertTest"),
                              false, false,
View Full Code Here

     *
     * @throws Exception
     */
    public void testMessageSizeAlert() throws Exception
    {
        setSession(new InternalTestProtocolSession(getVirtualHost()));
        AMQChannel channel = new AMQChannel(getSession(), 2, getMessageStore());
        getSession().addChannel(channel);

        setQueue(AMQQueueFactory.createAMQQueueImpl(new AMQShortString("testQueue2"), false, new AMQShortString("AMQueueAlertTest"),
                              false, false,
View Full Code Here

     *
     * @throws Exception
     */
    public void testQueueDepthAlertNoSubscriber() throws Exception
    {
        setSession(new InternalTestProtocolSession(getVirtualHost()));
        AMQChannel channel = new AMQChannel(getSession(), 2, getMessageStore());
        getSession().addChannel(channel);

        setQueue(AMQQueueFactory.createAMQQueueImpl(new AMQShortString("testQueue3"), false, new AMQShortString("AMQueueAlertTest"),
                              false, false,
View Full Code Here

     *
     * @throws Exception
     */
    public void testMessageAgeAlert() throws Exception
    {
        setSession(new InternalTestProtocolSession(getVirtualHost()));
        AMQChannel channel = new AMQChannel(getSession(), 2, getMessageStore());
        getSession().addChannel(channel);

        setQueue(AMQQueueFactory.createAMQQueueImpl(new AMQShortString("testQueue4"), false, new AMQShortString("AMQueueAlertTest"),
                              false, false,
View Full Code Here

    {
        super.setUp();
        _exchange = new TopicExchange();
        _vhost = ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHosts().iterator().next();
        _store = new MemoryMessageStore();
        _protocolSession = new InternalTestProtocolSession(_vhost);
    }
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

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.