You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/01/02 09:18:19 UTC
[2/2] camel git commit: Add endHystrix to java dsl
Add endHystrix to java dsl
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0b47ab94
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0b47ab94
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0b47ab94
Branch: refs/heads/camel-2.18.x
Commit: 0b47ab94eed69a4635166c9941f2e0e0f964bd66
Parents: 25d0541
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jan 2 10:14:33 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jan 2 10:18:09 2017 +0100
----------------------------------------------------------------------
.../apache/camel/model/ProcessorDefinition.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0b47ab94/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 9acf521..d622aab 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
@@ -1381,6 +1381,24 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
}
/**
+ * Ends the current block and returns back to the {@link HystrixDefinition hystrix()} DSL.
+ *
+ * @return the builder
+ */
+ public HystrixDefinition endHystrix() {
+ ProcessorDefinition<?> def = this;
+
+ // are we already a try?
+ if (def instanceof HystrixDefinition) {
+ return (HystrixDefinition) def;
+ }
+
+ // okay end this and get back to the try
+ def = end();
+ return (HystrixDefinition) def;
+ }
+
+ /**
* <a href="http://camel.apache.org/idempotent-consumer.html">Idempotent consumer EIP:</a>
* Creates an {@link org.apache.camel.processor.idempotent.IdempotentConsumer IdempotentConsumer}
* to avoid duplicate messages