Author: davsclaus
Date: Tue Jun 28 12:40:15 2011
New Revision: 1140572

URL: http://svn.apache.org/viewvc?rev=1140572&view=rev
Log:
CAMEL-3655: Polished a bit. Added more javadoc and renamed a method to better 
reflect what it does

Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumerPollingStrategy.java
    
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java
    
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumerPollingStrategy.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumerPollingStrategy.java?rev=1140572&r1=1140571&r2=1140572&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumerPollingStrategy.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumerPollingStrategy.java
 Tue Jun 28 12:40:15 2011
@@ -17,16 +17,21 @@
 package org.apache.camel;
 
 /**
- * Strategy that allows consumers to influence the {@link PollingConsumer}.
+ * Strategy that allows {@link Consumer}s to influence the {@link 
PollingConsumer}.
+ * <p/>
+ * For example this is used by schedule based consumers to be able to 
suspend/resume
+ * upon polling using a {@link PollingConsumer}.
+ *
+ * @see org.apache.camel.impl.EventDrivenPollingConsumer
  */
 public interface PollingConsumerPollingStrategy {
 
     /**
-     * Callback invoked when the consumer is started.
+     * Callback invoked when the consumer is initialized such as when the 
{@link PollingConsumer} starts.
      *
-     * @throws Exception can be thrown if error starting.
+     * @throws Exception can be thrown if error initializing.
      */
-    void onStartup() throws Exception;
+    void onInit() throws Exception;
 
     /**
      * Callback invoked before the poll.

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java?rev=1140572&r1=1140571&r2=1140572&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java
 Tue Jun 28 12:40:15 2011
@@ -144,7 +144,7 @@ public class EventDrivenPollingConsumer 
         // if the consumer has a polling strategy then invoke that
         if (consumer instanceof PollingConsumerPollingStrategy) {
             PollingConsumerPollingStrategy strategy = 
(PollingConsumerPollingStrategy) consumer;
-            strategy.onStartup();
+            strategy.onInit();
         } else {
             // for regular consumers start it
             ServiceHelper.startService(consumer);

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java?rev=1140572&r1=1140571&r2=1140572&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
 Tue Jun 28 12:40:15 2011
@@ -274,7 +274,7 @@ public abstract class ScheduledPollConsu
     }
 
     @Override
-    public void onStartup() throws Exception {
+    public void onInit() throws Exception {
         // start our self
         ServiceHelper.startService(this);
     }


Reply via email to