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 Fri, 27 Nov 2015 07:12:20 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/bb54c6f2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bb54c6f2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bb54c6f2

Branch: refs/heads/camel-2.16.x
Commit: bb54c6f2da6fef154d44f578fff94ff6060a3f8f
Parents: 7bb44ce
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Nov 27 07:33:17 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Nov 27 08:12:09 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/impl/ScheduledPollEndpoint.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bb54c6f2/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 5ebc194..28d438a 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
@@ -115,9 +115,8 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
             if ("none".equals(schedulerName)) {
                 // no cron scheduler in use
                 scheduler = null;
-            }
-            // special for scheduler if its "spring" or "quartz2"
-            if ("spring".equals(schedulerName)) {
+            } else if ("spring".equals(schedulerName)) {
+                // special for scheduler if its "spring" or "quartz2"
                 try {
                     Class<? extends ScheduledPollConsumerScheduler> clazz = getCamelContext().getClassResolver().resolveMandatoryClass(SPRING_SCHEDULER,
ScheduledPollConsumerScheduler.class);
                     setScheduler(getCamelContext().getInjector().newInstance(clazz));
@@ -125,6 +124,7 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
                     throw new IllegalArgumentException("Cannot load " + SPRING_SCHEDULER
+ " from classpath. Make sure camel-spring.jar is on the classpath.", e);
                 }
             } else if ("quartz2".equals(schedulerName)) {
+                // special for scheduler if its "spring" or "quartz2"
                 try {
                     Class<? extends ScheduledPollConsumerScheduler> clazz = getCamelContext().getClassResolver().resolveMandatoryClass(QUARTZ_2_SCHEDULER,
ScheduledPollConsumerScheduler.class);
                     setScheduler(getCamelContext().getInjector().newInstance(clazz));
@@ -132,6 +132,7 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
                     throw new IllegalArgumentException("Cannot load " + QUARTZ_2_SCHEDULER
+ " from classpath. Make sure camel-quarz2.jar is on the classpath.", e);
                 }
             } else {
+                // must refer to a custom scheduler by the given name
                 setScheduler(CamelContextHelper.mandatoryLookup(getCamelContext(), schedulerName,
ScheduledPollConsumerScheduler.class));
             }
         }
@@ -345,7 +346,7 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
     /**
      * Allow to plugin a custom org.apache.camel.spi.ScheduledPollConsumerScheduler to use
as the scheduler for
      * firing when the polling consumer runs. This option is used for referring to one of
the built-in schedulers
-     * either <tt>spring</tt>, or <tt>quartz2</tt>.
+     * either <tt>spring</tt>, or <tt>quartz2</tt>. Using <tt>none</tt>
refers to no scheduler to be used.
      */
     public void setScheduler(String schedulerName) {
         this.schedulerName = schedulerName;


Mime
View raw message