Author: davsclaus
Date: Mon Aug 22 11:16:18 2011
New Revision: 1160205

URL: http://svn.apache.org/viewvc?rev=1160205&view=rev
Log:
Polished javadoc and added note about done UoW from PollingConsumer

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/ConsumerTemplate.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/ConsumerTemplate.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/ConsumerTemplate.java?rev=1160205&r1=1160204&r2=1160205&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/ConsumerTemplate.java 
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/ConsumerTemplate.java 
Mon Aug 22 11:16:18 2011
@@ -34,8 +34,8 @@ package org.apache.camel;
  * <ul>
  * <li>throws {@link RuntimeCamelException} as stated above</li>
  * <li>The <tt>fault.body</tt> if there is a fault message set and its not 
<tt>null</tt></li>
- * <li>The <tt>out.body<tt> if there is a out message set and its not 
<tt>null<tt></li>
- * <li>The <tt>in.body<tt></li>
+ * <li>The <tt>out.body</tt> if there is a out message set and its not 
<tt>null</tt></li>
+ * <li>The <tt>in.body</tt></li>
  * </ul>
  * <p/>
  * <b>Important note on usage:</b> See this

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java?rev=1160205&r1=1160204&r2=1160205&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java 
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java 
Mon Aug 22 11:16:18 2011
@@ -20,7 +20,14 @@ package org.apache.camel;
  * Represents a <a
  * href="http://camel.apache.org/polling-consumer.html";>Polling
  * Consumer</a> where the caller polls for messages when it is ready.
- * 
+ * <p/>
+ * When you are done with the returned {@link Exchange} you must ensure to 
invoke
+ * {@link org.apache.camel.spi.UnitOfWork#done(Exchange)} to signal to Camel 
that the {@link Exchange} is done.
+ * <p/>
+ * This is needed to ensure any {@link org.apache.camel.spi.Synchronization} 
works is being executed.
+ * For example if you consumed from a file endpoint, then the consumed file is 
only moved/delete when
+ * you done the {@link Exchange}.
+ *
  * @version 
  */
 public interface PollingConsumer extends Consumer {
@@ -30,7 +37,10 @@ public interface PollingConsumer extends
      * method could block indefinitely if no messages are available.
      * <p/>
      * Will return <tt>null</tt> if the consumer is not started
-     * 
+     * <p/>
+     * <b>Important: </b> See the class javadoc about the need for done the 
{@link org.apache.camel.spi.UnitOfWork}
+     * on the returned {@link Exchange}
+     *
      * @return the message exchange received.
      */
     Exchange receive();
@@ -38,7 +48,10 @@ public interface PollingConsumer extends
     /**
      * Attempts to receive a message exchange immediately without waiting and
      * returning <tt>null</tt> if a message exchange is not available yet.
-     * 
+     * <p/>
+     * <b>Important: </b> See the class javadoc about the need for done the 
{@link org.apache.camel.spi.UnitOfWork}
+     * on the returned {@link Exchange}
+     *
      * @return the message exchange if one is immediately available otherwise
      *         <tt>null</tt>
      */
@@ -46,7 +59,10 @@ public interface PollingConsumer extends
 
     /**
      * Attempts to receive a message exchange, waiting up to the given timeout
-     * to expire if a message is not yet available
+     * to expire if a message is not yet available.
+     * <p/>
+     * <b>Important: </b> See the class javadoc about the need for done the 
{@link org.apache.camel.spi.UnitOfWork}
+     * on the returned {@link Exchange}
      * 
      * @param timeout the amount of time in milliseconds to wait for a message
      *                before timing out and returning <tt>null</tt>


Reply via email to