Repository: camel Updated Branches: refs/heads/master 26fa5b7cc -> 9275c9924
CAMEL-8097: improved javadoc doc Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9275c992 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9275c992 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9275c992 Branch: refs/heads/master Commit: 9275c992412c7178afd2a1b7786ff04a493cced9 Parents: 26fa5b7 Author: Claus Ibsen <[email protected]> Authored: Mon Dec 1 12:22:47 2014 +0100 Committer: Claus Ibsen <[email protected]> Committed: Mon Dec 1 12:22:47 2014 +0100 ---------------------------------------------------------------------- .../org/apache/camel/model/ProcessorDefinition.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/9275c992/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java index 1be62f5..64f3569 100644 --- a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java @@ -1168,8 +1168,18 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type> /** * Ends the current block and returns back to the {@link ChoiceDefinition choice()} DSL. + * <p/> + * <b>Important:</b> If you want to end the entire choice block, then use {@link #end()} instead. + * The purpose of {@link #endChoice()} is to return <i>control</i> back to the {@link ChoiceDefinition choice()} DSL, + * so you can add subsequent <tt>when</tt> and <tt>otherwise</tt> to the choice. There can be situations where + * you would need to use {@link #endChoice()} often when you add additional EIPs inside the <tt>when</tt>'s, and + * the DSL <t>looses</t> scope when using a regular {@link #end()}, and you would need to use this {@link #endChoice()} + * to return back the scope to the {@link ChoiceDefinition choice()} DSL. + * <p/> + * For more details and examples see also this FAQ: + * <a href="http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html">Why can I not use when or otherwise in a Java Camel route </a>. * - * @return the builder + * @return the choice builder */ public ChoiceDefinition endChoice() { // are we nested choice?
