svn commit: r713262 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx: JMXEndpoint.java JMXExchange.java JMXMessage.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r713262 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx: JMXEndpoint.java JMXExchange.java JMXMessage.java

hadrian-3
Author: hadrian
Date: Tue Nov 11 20:21:00 2008
New Revision: 713262

URL: http://svn.apache.org/viewvc?rev=713262&view=rev
Log:
CAMEL-1078.  Removed JMXExchange.

Removed:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXExchange.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXMessage.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXEndpoint.java?rev=713262&r1=713261&r2=713262&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXEndpoint.java Tue Nov 11 20:21:00 2008
@@ -27,6 +27,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.impl.DefaultExchange;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -91,16 +92,18 @@
         return true;
     }
 
-    public JMXExchange createExchange(Notification notification) {
-        return new JMXExchange(getCamelContext(), getExchangePattern(), notification);
+    public Exchange createExchange(Notification notification) {
+        Exchange exchange = new DefaultExchange(getCamelContext(), getExchangePattern());
+        exchange.setIn(new JMXMessage(notification));
+        return exchange;
     }
 
     public Exchange createExchange() {
-        return new JMXExchange(getCamelContext(), getExchangePattern(), null);
+        return createExchange(getExchangePattern());
     }
 
     public Exchange createExchange(ExchangePattern pattern) {
-        return new JMXExchange(getCamelContext(), pattern, null);
+        return new DefaultExchange(getCamelContext(), pattern);
     }
 
     public String getAttributeName() {

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXMessage.java?rev=713262&r1=713261&r2=713262&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXMessage.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/jmx/JMXMessage.java Tue Nov 11 20:21:00 2008
@@ -17,6 +17,8 @@
 package org.apache.camel.component.jmx;
 
 import javax.management.Notification;
+
+import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultMessage;
 
 /**
@@ -42,8 +44,8 @@
     }
 
     @Override
-    public JMXExchange getExchange() {
-        return (JMXExchange)super.getExchange();
+    public Exchange getExchange() {
+        return super.getExchange();
     }
 
     @Override