Author: davsclaus
Date: Sun Mar 31 06:43:23 2013
New Revision: 1462884
URL: http://svn.apache.org/r1462884
Log:
Added note to javadoc about threadsafety
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/ConsumerTemplate.java
camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.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=1462884&r1=1462883&r2=1462884&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
Sun Mar 31 06:43:23 2013
@@ -17,29 +17,29 @@
package org.apache.camel;
/**
- * Template (named like Spring's TransactionTemplate & JmsTemplate
- * et al) for working with Camel and consuming {@link Message} instances in an
+ * Template for working with Camel and consuming {@link Message} instances in
an
* {@link Exchange} from an {@link Endpoint}.
- * <p/>
- * This template is an implementation of the
+ * <br/>
+ * <p/>This template is an implementation of the
* <a href="http://camel.apache.org/polling-consumer.html">Polling Consumer
EIP</a>.
* This is <b>not</b> the <a
href="http://camel.apache.org/event-driven-consumer.html">Event Driven Consumer
EIP</a>.
- * <p/>
- * <b>All</b> methods throws {@link RuntimeCamelException} if consuming of
+ * <br/>
+ * <p/>The {@link ConsumerTemplate} is <b>thread safe</b>.
+ * <br/>
+ * <p/><b>All</b> methods throws {@link RuntimeCamelException} if consuming of
* the {@link Exchange} failed and an Exception occurred. The <tt>getCause</tt>
* method on {@link RuntimeCamelException} returns the wrapper original caused
* exception.
- * <p/>
- * All the receive<b>Body</b> methods will return the content according to
this strategy
+ * <br/>
+ * <p/>All the receive<b>Body</b> methods will return the content according to
this strategy
* <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>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>
* </ul>
- * <p/>
* <br/>
- * Before using the template it must be started.
+ * <p/>Before using the template it must be started.
* And when you are done using the template, make sure to {@link #stop()} the
template.
* <br/>
* <p/><b>Important note on usage:</b> See this
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java?rev=1462884&r1=1462883&r2=1462884&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java
Sun Mar 31 06:43:23 2013
@@ -25,20 +25,21 @@ import java.util.concurrent.TimeoutExcep
import org.apache.camel.spi.Synchronization;
/**
- * Template (named like Spring's TransactionTemplate & JmsTemplate
- * et al) for working with Camel and sending {@link Message} instances in an
+ * Template for working with Camel and sending {@link Message} instances in an
* {@link Exchange} to an {@link Endpoint}.
- * <br/><br/>
+ * <br/>
* <p/><b>Important:</b> Read the javadoc of each method carefully to ensure
the behavior of the method is understood.
* Some methods is for <tt>InOnly</tt>, others for <tt>InOut</tt> MEP. And
some methods throws
* {@link org.apache.camel.CamelExecutionException} while others stores any
thrown exception on the returned
* {@link Exchange}.
- * <br/><br/>
+ * <br/>
+ * <p/>The {@link ProducerTemplate} is <b>thread safe</b>.
+ * <br/>
* <p/>All the methods which sends a message may throw {@link
FailedToCreateProducerException} in
* case the {@link Producer} could not be created. Or a {@link
NoSuchEndpointException} if the endpoint could
* not be resolved. There may be other related exceptions being thrown which
occurs <i>before</i> the {@link Producer}
* has started sending the message.
- * <br/><br/>
+ * <br/>
* <p/>All the sendBody or requestBody methods will return the content
according to this strategy:
* <ul>
* <li>throws {@link org.apache.camel.CamelExecutionException} if processing
failed <i>during</i> routing
@@ -47,9 +48,8 @@ import org.apache.camel.spi.Synchronizat
* <li>Either <tt>IN</tt> or <tt>OUT</tt> body according to the message
exchange pattern. If the pattern is
* Out capable then the <tt>OUT</tt> body is returned, otherwise <tt>IN</tt>.
* </ul>
- * <p/>
* <br/>
- * Before using the template it must be started.
+ * <p/>Before using the template it must be started.
* And when you are done using the template, make sure to {@link #stop()} the
template.
* <br/>
* <p/><b>Important note on usage:</b> See this