svn commit: r713240 - in /activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz: QuartzEndpoint.java QuartzExchange.java QuartzMessage.java

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

svn commit: r713240 - in /activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz: QuartzEndpoint.java QuartzExchange.java QuartzMessage.java

hadrian-3
Author: hadrian
Date: Tue Nov 11 17:30:11 2008
New Revision: 713240

URL: http://svn.apache.org/viewvc?rev=713240&view=rev
Log:
CAMEL-1078.  Remove QuartzExchange.

Removed:
    activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzExchange.java
Modified:
    activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
    activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java?rev=713240&r1=713239&r2=713240&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java Tue Nov 11 17:30:11 2008
@@ -25,6 +25,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.camel.processor.loadbalancer.LoadBalancer;
 import org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer;
 import org.apache.camel.util.ObjectHelper;
@@ -113,7 +114,7 @@
         if (LOG.isDebugEnabled()) {
             LOG.debug("Firing Quartz Job with context: " + jobExecutionContext);
         }
-        QuartzExchange exchange = createExchange(jobExecutionContext);
+        Exchange exchange = createExchange(jobExecutionContext);
         try {
             getLoadBalancer().process(exchange);
         } catch (JobExecutionException e) {
@@ -125,11 +126,13 @@
 
     @Override
     public Exchange createExchange(ExchangePattern pattern) {
-        return new QuartzExchange(getCamelContext(), pattern, null);
+        return new DefaultExchange(getCamelContext(), pattern);
     }
 
-    public QuartzExchange createExchange(JobExecutionContext jobExecutionContext) {
-        return new QuartzExchange(getCamelContext(), getExchangePattern(), jobExecutionContext);
+    public Exchange createExchange(JobExecutionContext jobExecutionContext) {
+        Exchange exchange = new DefaultExchange(getCamelContext(), getExchangePattern());
+        exchange.setIn(new QuartzMessage(exchange, jobExecutionContext));
+        return exchange;
     }
 
     public Producer createProducer() throws Exception {

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java?rev=713240&r1=713239&r2=713240&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java Tue Nov 11 17:30:11 2008
@@ -18,6 +18,7 @@
 
 import java.util.Map;
 
+import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultMessage;
 
 import org.quartz.JobExecutionContext;
@@ -29,7 +30,7 @@
 public class QuartzMessage extends DefaultMessage {
     private final JobExecutionContext jobExecutionContext;
 
-    public QuartzMessage(QuartzExchange exchange, JobExecutionContext jobExecutionContext) {
+    public QuartzMessage(Exchange exchange, JobExecutionContext jobExecutionContext) {
         this.jobExecutionContext = jobExecutionContext;
         setExchange(exchange);
         if (jobExecutionContext != null) {