Package org.apache.qpid.client.message

Examples of org.apache.qpid.client.message.AbstractJMSMessage


                //handle case where connection has already been started, and the dispatcher is blocked
                //doing a put on the _synchronousQueue
                Object msg = _synchronousQueue.poll();
                if (msg != null)
                {
                    AbstractJMSMessage jmsMsg = (AbstractJMSMessage) msg;
                    messageListener.onMessage(jmsMsg);
                    postDeliver(jmsMsg);
                }
            }
        }
View Full Code Here


            }
            else
            {
                o = _synchronousQueue.take();
            }
            final AbstractJMSMessage m = returnMessageOrThrow(o);
            if (m != null)
            {
                postDeliver(m);
            }
            return m;
View Full Code Here

        acquireReceiving();

        try
        {
            Object o = _synchronousQueue.poll();
            final AbstractJMSMessage m = returnMessageOrThrow(o);
            if (m != null)
            {
                postDeliver(m);
            }
            return m;
View Full Code Here

        {
            _logger.debug("notifyMessage called with message number " + messageFrame.deliverBody.deliveryTag);
        }
        try
        {
            AbstractJMSMessage jmsMessage = _messageFactory.createMessage(messageFrame.deliverBody.deliveryTag,
                                                                          messageFrame.deliverBody.redelivered,
                                                                          messageFrame.contentHeader,
                                                                          messageFrame.bodies);

            _logger.debug("Message is of type: " + jmsMessage.getClass().getName());

            preDeliver(jmsMessage);

            if (isMessageListenerSet())
            {
View Full Code Here

            public void run()
            {
                try
                {
                    // Bounced message is processed here, away from the mina thread
                    AbstractJMSMessage bouncedMessage =
                            _messageFactoryRegistry.createMessage(0, false, msg.getExchange(),
                                                                  msg.getRoutingKey(), msg.getContentHeader(), msg.getBodies());
                    AMQConstant errorCode = AMQConstant.getConstant(msg.getReplyCode());
                    AMQShortString reason = msg.getReplyText();
                    _logger.debug("Message returned with error code " + errorCode + " (" + reason + ")");
View Full Code Here

            if (messageListener != null && !getSynchronousQueue().isEmpty())
            {
                Iterator messages= getSynchronousQueue().iterator();
                while (messages.hasNext())
                {
                    AbstractJMSMessage message=(AbstractJMSMessage) messages.next();
                    messages.remove();
                    getSession().rejectMessage(message, true);
                }
            }
        }
View Full Code Here

        testMapMessage.setDouble("testMapDouble", Double.MAX_VALUE);
    }

    public void testSetProperties() throws Exception
    {
        AbstractJMSMessage newMessage = new MessageConverter(_session, (TextMessage) testTextMessage).getConvertedMessage();
        mesagePropertiesTest(testTextMessage, newMessage);
    }
View Full Code Here

        mesagePropertiesTest(testTextMessage, newMessage);
    }

    public void testJMSTextMessageConversion() throws Exception
    {
        AbstractJMSMessage newMessage = new MessageConverter(_session, (TextMessage) testTextMessage).getConvertedMessage();
        assertEquals("Converted message text mismatch", ((JMSTextMessage) newMessage).getText(), testTextMessage.getText());
    }
View Full Code Here

        assertEquals("Converted message text mismatch", ((JMSTextMessage) newMessage).getText(), testTextMessage.getText());
    }

    public void testJMSMapMessageConversion() throws Exception
    {
        AbstractJMSMessage newMessage = new MessageConverter(_session, (MapMessage) testMapMessage).getConvertedMessage();
        assertEquals("Converted map message String mismatch", ((JMSMapMessage) newMessage).getString("testMapString"),
                     testMapMessage.getString("testMapString"));
        assertEquals("Converted map message Double mismatch", ((JMSMapMessage) newMessage).getDouble("testMapDouble"),
                     testMapMessage.getDouble("testMapDouble"));
View Full Code Here

        _session.startDispatcherIfNecessary();

        try
        {
            Object o = getMessageFromQueue(l);
            final AbstractJMSMessage m = returnMessageOrThrow(o);
            if (m != null)
            {
                preDeliver(m);
                postDeliver(m);
            }
View Full Code Here

TOP

Related Classes of org.apache.qpid.client.message.AbstractJMSMessage

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.