activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r521740 - in /activemq/camel/trunk: camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiExchange.java camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java
Date Fri, 23 Mar 2007 14:30:27 GMT
Author: jstrachan
Date: Fri Mar 23 07:30:26 2007
New Revision: 521740

URL: http://svn.apache.org/viewvc?view=rev&rev=521740
Log:
added helper methods

Modified:
    activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiExchange.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java

Modified: activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiExchange.java?view=diff&rev=521740&r1=521739&r2=521740
==============================================================================
--- activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiExchange.java
(original)
+++ activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiExchange.java
Fri Mar 23 07:30:26 2007
@@ -22,6 +22,7 @@
 import org.apache.camel.impl.DefaultExchange;
 
 import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
 
 /**
  * An {@link Exchange} working with JBI which exposes the underlying JBI features such as
the 
@@ -49,15 +50,6 @@
         setFault(new JbiMessage(messageExchange.getMessage("fault")));
     }
 
-    /**
-     * Returns the underlying JBI message exchange for an inbound exchange
-     * or null for outbound messages
-     *
-     * @return the inbound message exchange
-     */
-    public MessageExchange getMessageExchange() {
-        return messageExchange;
-    }
 
     @Override
     public JbiMessage getIn() {
@@ -81,6 +73,51 @@
         return binding;
     }
 
+
+    // Expose JBI features
+    //-------------------------------------------------------------------------
+
+    /**
+     * Returns the underlying JBI message exchange for an inbound exchange
+     * or null for outbound messages
+     *
+     * @return the inbound message exchange
+     */
+    public MessageExchange getMessageExchange() {
+        return messageExchange;
+    }
+
+    /**
+     * Returns the underlying In {@link NormalizedMessage}
+     *
+     * @return the In message
+     */
+    public NormalizedMessage getInMessage() {
+        return getIn().getNormalizedMessage();
+    }
+
+    /**
+     * Returns the underlying Out {@link NormalizedMessage}
+     *
+     * @return the Out message
+     */
+    public NormalizedMessage getOutMessage() {
+        return getOut().getNormalizedMessage();
+    }
+
+    /**
+     * Returns the underlying Fault {@link NormalizedMessage}
+     *
+     * @return the Fault message
+     */
+    public NormalizedMessage getFaultMessage() {
+        return getFault().getNormalizedMessage();
+    }
+
+    
+    // Implementation methods
+    //-------------------------------------------------------------------------
+    
     @Override
     protected JbiMessage createInMessage() {
         return new JbiMessage();

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java?view=diff&rev=521740&r1=521739&r2=521740
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java
(original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsExchange.java
Fri Mar 23 07:30:26 2007
@@ -64,6 +64,41 @@
         return new JmsExchange(getContext(), binding);
     }
 
+
+    // Expose JMS APIs
+    //-------------------------------------------------------------------------
+
+    /**
+     * Return the underlying JMS In message
+     *
+     * @return the JMS In message
+     */
+    public Message getInMessage() {
+        return getIn().getJmsMessage();
+    }
+
+    /**
+     * Return the underlying JMS Out message
+     *
+     * @return the JMS out message
+     */
+    public Message getOutMessage() {
+        return getOut().getJmsMessage();
+    }
+
+    /**
+     * Return the underlying JMS Fault message
+     *
+     * @return the JMS fault message
+     */
+    public Message getFaultMessage() {
+        return getOut().getJmsMessage();
+    }
+
+
+    // Implementation methods
+    //-------------------------------------------------------------------------
+
     @Override
     protected JmsMessage createInMessage() {
         return new JmsMessage();



Mime
View raw message