camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: Add endHystrix to java dsl
Date Mon, 02 Jan 2017 09:18:18 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 25d054196 -> 0b47ab94e
  refs/heads/master 78b49266b -> 2d5b5f17d


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/2d5b5f17
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2d5b5f17
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2d5b5f17

Branch: refs/heads/master
Commit: 2d5b5f17de8babbad1b435b500d378603436f048
Parents: 78b4926
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jan 2 10:14:33 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jan 2 10:14:33 2017 +0100

----------------------------------------------------------------------
 .../apache/camel/model/ProcessorDefinition.java   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2d5b5f17/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 da16e71..ba5fd37 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
@@ -1389,6 +1389,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


Mime
View raw message