diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2007-01-17 20:27:17 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2007-01-17 20:27:17 +0000 |
| commit | bd83128345a1345d235363e300be2f4623c5c297 (patch) | |
| tree | 164f620250f1420e2ffbe58a6472bc694dbdb22d /java/client/src | |
| parent | 844e632c013affdfd028704a195a746f6973ebb2 (diff) | |
| download | qpid-python-bd83128345a1345d235363e300be2f4623c5c297.tar.gz | |
This contains modifications to create messages using the new MessageHeaders and Content classes
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497161 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java b/java/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java index 348988f06d..108f041f78 100644 --- a/java/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java +++ b/java/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java @@ -20,14 +20,13 @@ */ package org.apache.qpid.client.message; -import org.apache.qpid.AMQException; -import org.apache.qpid.framing.BasicContentHeaderProperties; -import org.apache.qpid.framing.ContentHeaderBody; - -import javax.jms.JMSException; import java.util.HashMap; import java.util.Map; -import java.util.List; + +import javax.jms.JMSException; + +import org.apache.qpid.AMQException; +import org.apache.qpid.framing.Content; public class MessageFactoryRegistry { @@ -59,18 +58,17 @@ public class MessageFactoryRegistry * @throws JMSException */ public AbstractJMSMessage createMessage(long deliveryTag, boolean redelivered, - ContentHeaderBody contentHeader, - List bodies) throws AMQException, JMSException + MessageHeaders contentHeader, + Content body) throws AMQException, JMSException { - BasicContentHeaderProperties properties = (BasicContentHeaderProperties) contentHeader.properties; - MessageFactory mf = (MessageFactory) _mimeToFactoryMap.get(properties.getContentType()); + MessageFactory mf = (MessageFactory) _mimeToFactoryMap.get(contentHeader.getContentType()); if (mf == null) { - throw new AMQException("Unsupport MIME type of " + properties.getContentType()); + throw new AMQException("Unsupport MIME type of " + contentHeader.getContentType()); } else { - return mf.createMessage(deliveryTag, redelivered, contentHeader, bodies); + return mf.createMessage(deliveryTag, redelivered, contentHeader, body); } } |
