camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: Component docs
Date Thu, 26 Nov 2015 09:05:22 GMT
Component docs


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

Branch: refs/heads/camel-2.16.x
Commit: 0c8d4e83487069f96799d305ba072883ef107a67
Parents: fc2a194
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Nov 26 10:04:07 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Nov 26 10:05:12 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/impl/ScheduledPollEndpoint.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0c8d4e83/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
index f63e2ba..5ebc194 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
@@ -64,9 +64,9 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
     private boolean sendEmptyMessageWhenIdle;
     @UriParam(label = "consumer,scheduler", description = "If greedy is enabled, then the
ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.")
     private boolean greedy;
-    @UriParam(enums = "spring,quartz2", label = "consumer,scheduler", description = "To use
a cron scheduler from either camel-spring or camel-quartz2 component")
+    @UriParam(enums = "none,spring,quartz2", defaultValue = "none", label = "consumer,scheduler",
description = "To use a cron scheduler from either camel-spring or camel-quartz2 component")
     private ScheduledPollConsumerScheduler scheduler;
-    private String schedulerName; // used when configuring scheduler using a string value
+    private String schedulerName = "none"; // used when configuring scheduler using a string
value
     @UriParam(label = "consumer,scheduler", description = "To configure additional properties
when using a custom scheduler or any of the Quartz2, Spring based scheduler.")
     private Map<String, Object> schedulerProperties;
     @UriParam(label = "consumer,scheduler",
@@ -112,7 +112,11 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
         }
 
         if (scheduler == null && schedulerName != null) {
-            // special for scheduler if its "spring"
+            if ("none".equals(schedulerName)) {
+                // no cron scheduler in use
+                scheduler = null;
+            }
+            // special for scheduler if its "spring" or "quartz2"
             if ("spring".equals(schedulerName)) {
                 try {
                     Class<? extends ScheduledPollConsumerScheduler> clazz = getCamelContext().getClassResolver().resolveMandatoryClass(SPRING_SCHEDULER,
ScheduledPollConsumerScheduler.class);


Mime
View raw message