qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r574223 - /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
Date Mon, 10 Sep 2007 12:38:21 GMT
Author: arnaudsimon
Date: Mon Sep 10 05:38:20 2007
New Revision: 574223

URL: http://svn.apache.org/viewvc?rev=574223&view=rev
Log:
added AbstractJMSMessage createJMSMessageFromUnprocessedMessage

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java?rev=574223&r1=574222&r2=574223&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
Mon Sep 10 05:38:20 2007
@@ -39,6 +39,8 @@
 import org.apache.qpid.client.protocol.AMQProtocolHandler;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.FieldTable;
+import org.apache.qpid.framing.ContentHeaderBody;
+import org.apache.qpid.framing.ContentBody;
 import org.apache.qpid.jms.MessageConsumer;
 import org.apache.qpid.jms.Session;
 import org.slf4j.Logger;
@@ -586,7 +588,14 @@
         }
     }
 
-    public abstract AbstractJMSMessage createJMSMessageFromUnprocessedMessage(UnprocessedMessage<H,B>
messageFrame)throws Exception;
+    public AbstractJMSMessage createJMSMessageFromUnprocessedMessage(UnprocessedMessage<ContentHeaderBody,
ContentBody> messageFrame)throws Exception
+     {
+
+        return _messageFactory.createMessage(messageFrame.getDeliveryTag(),
+            messageFrame.isRedelivered(), messageFrame.getExchange(),
+            messageFrame.getRoutingKey(), messageFrame.getContentHeader(), messageFrame.getBodies());
+
+    }
 
     /**
      * @param jmsMessage this message has already been processed so can't redo preDeliver
@@ -629,7 +638,7 @@
         }
     }
 
-    private void preDeliver(AbstractJMSMessage msg)
+    void preDeliver(AbstractJMSMessage msg)
     {
         switch (_acknowledgeMode)
         {
@@ -646,7 +655,7 @@
         }
     }
 
-    private void postDeliver(AbstractJMSMessage msg) throws JMSException
+     void postDeliver(AbstractJMSMessage msg) throws JMSException
     {
         msg.setJMSDestination(_destination);
         switch (_acknowledgeMode)



Mime
View raw message