Package org.apache.qpid.server.queue

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


        AMQMessage message = createMessage("a.c.b.b.c");

        try
        {
            _exchange.route(message);
            message.routingComplete(_store, _context, new MessageHandleFactory());
            fail("Message has route and should not be routed");
        }
        catch (AMQException nre)
        {
        }

        Assert.assertEquals(0, queue.getMessageCount());

        message = createMessage("a.a.b.c.d");

        try
        {
            _exchange.route(message);
            message.routingComplete(_store, _context, new MessageHandleFactory());
        }
        catch (AMQException nre)
        {
            fail("Message has no route and should be routed");
        }
View Full Code Here


        AMQMessage message = createMessage("a.b.c");

        try
        {
            _exchange.route(message);
            message.routingComplete(_store, _context, new MessageHandleFactory());
            fail("Message has route and should not be routed");
        }
        catch (AMQException nre)
        {
        }
View Full Code Here

        AMQMessage message = createMessage("a.b.c");

        try
        {
            _exchange.route(message);
            message.routingComplete(_store, _context, new MessageHandleFactory());
            fail("Message has route and should not be routed");
        }
        catch (AMQException nre)
        {
        }
View Full Code Here

        AMQMessage message = createMessage("a");

        try
        {
            _exchange.route(message);
            message.routingComplete(_store, _context, new MessageHandleFactory());
            fail("Message has route and should not be routed");
        }
        catch (AMQException nre)
        {
        }
View Full Code Here

                                            new NonTransactionalContext(_store, _storeContext, null, null, null),
                                            createPersistentContentHeader());
        message = message.takeReference();

        // we call routing complete to set up the handle
        message.routingComplete(_store, _storeContext, new MessageHandleFactory());
        assertTrue(_store.getMessageMetaDataMap().size() == 1);
        message.decrementReference(_storeContext);
        assertTrue(_store.getMessageMetaDataMap().size() == 0);
    }
View Full Code Here

                                            new NonTransactionalContext(_store, _storeContext, null, null, null),
                                            createPersistentContentHeader());
       
        message = message.takeReference();
        // we call routing complete to set up the handle
        message.routingComplete(_store, _storeContext, new MessageHandleFactory());
        assertTrue(_store.getMessageMetaDataMap().size() == 1);
        message = message.takeReference();
        message.decrementReference(_storeContext);
        assertTrue(_store.getMessageMetaDataMap().size() == 1);
    }
View Full Code Here

            }
        };


        final long messageId = _store.getNewMessageId();
        AMQMessageHandle messageHandle = (new MessageHandleFactory()).createMessageHandle(messageId, _store, true);
        messageHandle.setPublishAndContentHeaderBody(_storeContext,info, chb);
        AMQMessage message = new AMQMessage(messageHandle,
                                             _storeContext,info);

        message = message.takeReference();
View Full Code Here

            }
        };

        final Long messageId = _store.getNewMessageId();
        final ContentHeaderBody chb = createPersistentContentHeader();
        AMQMessageHandle messageHandle = (new MessageHandleFactory()).createMessageHandle(messageId, _store, true);
        messageHandle.setPublishAndContentHeaderBody(_storeContext,info,chb);
        AMQMessage message = new AMQMessage(messageHandle,
                                             _storeContext,
                                            info);
       
View Full Code Here

        }
    }

    private static AMQMessageHandle createMessageHandle(final long messageId, final MessagePublishInfo publishBody)
    {
        final AMQMessageHandle amqMessageHandle = (new MessageHandleFactory()).createMessageHandle(messageId,
                                                                                                   null,
                                                                                                   false);
        try
        {
            amqMessageHandle.setPublishAndContentHeaderBody(new StoreContext(),
View Full Code Here

            {
                conn = newConnection();
            }


            MessageHandleFactory messageHandleFactory = new MessageHandleFactory();
            long maxId = 1;

            TransactionalContext txnContext = new NonTransactionalContext(this, new StoreContext(), null, null);

            Statement stmt = conn.createStatement();
View Full Code Here

TOP

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

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.