camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/2] git commit: CAMEL-7215 moved the onRemove method to ScheduledRoutePolicy
Date Tue, 18 Feb 2014 05:38:31 GMT
Repository: camel
Updated Branches:
  refs/heads/master b1f123361 -> 5626334d4


CAMEL-7215 moved the onRemove method to ScheduledRoutePolicy


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5626334d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5626334d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5626334d

Branch: refs/heads/master
Commit: 5626334d4b2a0088d01c3607224c39643a9fd446
Parents: 1cb6578
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Tue Feb 18 13:22:19 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Tue Feb 18 13:37:50 2014 +0800

----------------------------------------------------------------------
 .../routepolicy/quartz/CronScheduledRoutePolicy.java    | 11 +----------
 .../camel/routepolicy/quartz/ScheduledRoutePolicy.java  | 11 +++++++++++
 .../routepolicy/quartz/SimpleScheduledRoutePolicy.java  | 12 +-----------
 .../routepolicy/quartz2/CronScheduledRoutePolicy.java   |  9 ---------
 .../camel/routepolicy/quartz2/ScheduledRoutePolicy.java | 11 +++++++++++
 .../routepolicy/quartz2/SimpleScheduledRoutePolicy.java | 10 ----------
 6 files changed, 24 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5626334d/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicy.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicy.java
b/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicy.java
index 1c21f49..32161d8 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicy.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicy.java
@@ -73,16 +73,7 @@ public class CronScheduledRoutePolicy extends ScheduledRoutePolicy implements
Sc
             scheduleRoute(Action.RESUME, route);
         }
     }
-
-    public void onRemove(Route route) {
-        try {
-            // stop and un-schedule jobs
-            doStop();
-        } catch (Exception e) {
-            throw ObjectHelper.wrapRuntimeCamelException(e);
-        }
-    }
-
+    
     @Override
     protected Trigger createTrigger(Action action, Route route) throws Exception {
         CronTrigger trigger = null;

http://git-wip-us.apache.org/repos/asf/camel/blob/5626334d/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java
b/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java
index a22e397..b355413 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRoutePolicy.java
@@ -24,6 +24,7 @@ import org.apache.camel.Route;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.component.quartz.QuartzComponent;
 import org.apache.camel.impl.RoutePolicySupport;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ServiceHelper;
 import org.quartz.JobDetail;
 import org.quartz.Scheduler;
@@ -76,6 +77,16 @@ public abstract class ScheduledRoutePolicy extends RoutePolicySupport implements
             }
         }       
     }
+    
+    @Override
+    public void onRemove(Route route) {
+        try {
+            // stop and un-schedule jobs
+            doStop();
+        } catch (Exception e) {
+            throw ObjectHelper.wrapRuntimeCamelException(e);
+        }
+    }
 
     public void scheduleRoute(Action action, Route route) throws Exception {
         JobDetail jobDetail = createJobDetail(action, route);

http://git-wip-us.apache.org/repos/asf/camel/blob/5626334d/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicy.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicy.java
b/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicy.java
index 5f6be14..5b29f9b 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicy.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicy.java
@@ -103,17 +103,7 @@ public class SimpleScheduledRoutePolicy extends ScheduledRoutePolicy
{
         
         return trigger;
     }
-
-    @Override
-    public void onRemove(Route route) {
-        try {
-            // stop and un-schedule jobs
-            doStop();
-        } catch (Exception e) {
-            throw ObjectHelper.wrapRuntimeCamelException(e);
-        }
-    }
-
+    
     public Date getRouteStartDate() {
         return routeStartDate;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/5626334d/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicy.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicy.java
b/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicy.java
index 205f113..2271628 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicy.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicy.java
@@ -76,15 +76,6 @@ public class CronScheduledRoutePolicy extends ScheduledRoutePolicy implements
Sc
         }
     }
 
-    public void onRemove(Route route) {
-        try {
-            // stop and un-schedule jobs
-            doStop();
-        } catch (Exception e) {
-            throw ObjectHelper.wrapRuntimeCamelException(e);
-        }
-    }
-
     @Override
     protected Trigger createTrigger(Action action, Route route) throws Exception {
         CronTrigger trigger = null;

http://git-wip-us.apache.org/repos/asf/camel/blob/5626334d/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/ScheduledRoutePolicy.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/ScheduledRoutePolicy.java
b/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/ScheduledRoutePolicy.java
index df42873..eaeaeee 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/ScheduledRoutePolicy.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/ScheduledRoutePolicy.java
@@ -24,6 +24,7 @@ import org.apache.camel.Route;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.component.quartz2.QuartzComponent;
 import org.apache.camel.impl.RoutePolicySupport;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ServiceHelper;
 import org.quartz.JobBuilder;
 import org.quartz.JobDetail;
@@ -90,6 +91,16 @@ public abstract class ScheduledRoutePolicy extends RoutePolicySupport implements
             }
         }       
     }
+    
+    @Override
+    public void onRemove(Route route) {
+        try {
+            // stop and un-schedule jobs
+            doStop();
+        } catch (Exception e) {
+            throw ObjectHelper.wrapRuntimeCamelException(e);
+        }
+    }
 
     public void scheduleRoute(Action action, Route route) throws Exception {
         JobDetail jobDetail = createJobDetail(action, route);

http://git-wip-us.apache.org/repos/asf/camel/blob/5626334d/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicy.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicy.java
b/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicy.java
index cda294b..95f135e 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicy.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicy.java
@@ -126,16 +126,6 @@ public class SimpleScheduledRoutePolicy extends ScheduledRoutePolicy
{
         return trigger;
     }
 
-    @Override
-    public void onRemove(Route route) {
-        try {
-            // stop and un-schedule jobs
-            doStop();
-        } catch (Exception e) {
-            throw ObjectHelper.wrapRuntimeCamelException(e);
-        }
-    }
-
     public Date getRouteStartDate() {
         return routeStartDate;
     }


Mime
View raw message