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 2014/08/18 09:50:47 UTC

[2/6] git commit: CAMEL-7712: scala-dsl should have routeId in the DSL.

CAMEL-7712: scala-dsl should have routeId in the DSL.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6f8e98f4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6f8e98f4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6f8e98f4

Branch: refs/heads/master
Commit: 6f8e98f48c42352c96ebb11ec24313aaba863ad8
Parents: 86b37fe
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Aug 18 09:20:58 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Aug 18 09:20:58 2014 +0200

----------------------------------------------------------------------
 .../src/main/scala/org/apache/camel/scala/dsl/DSL.scala          | 1 +
 .../scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala  | 1 +
 .../test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala  | 4 ++++
 3 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6f8e98f4/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
index 0779746..839f644 100644
--- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
+++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
@@ -77,6 +77,7 @@ trait DSL {
   def recipients(expression: Exchange => Any) : DSL
   def resequence(expression: Exchange => Any) : SResequenceDefinition
   def rollback : DSL
+  def routeId(id: String) : DSL
   def routingSlip(header: String) : DSL
   def routingSlip(header: String, separator: String) : DSL
   def routingSlip(expression: Exchange => Any) : DSL

http://git-wip-us.apache.org/repos/asf/camel/blob/6f8e98f4/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
index 05fb0aa..26e19bb 100644
--- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
+++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
@@ -170,6 +170,7 @@ class RouteBuilder extends Preamble with DSL with RoutesBuilder with Languages w
   def recipients(expression: Exchange => Any) = stack.top.recipients(expression)
   def resequence(expression: Exchange => Any) = stack.top.resequence(expression)
   def rollback = stack.top.rollback
+  def routeId(id: String) = stack.top.routeId(id)
   def routingSlip(header: String) = stack.top.routingSlip(header)
   def routingSlip(header: String, separator: String) = stack.top.routingSlip(header, separator)
   def routingSlip(expression: Exchange => Any) = stack.top.routingSlip(expression)

http://git-wip-us.apache.org/repos/asf/camel/blob/6f8e98f4/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala
index 2dbf0e6..f6e51c7 100644
--- a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala
+++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala
@@ -51,6 +51,8 @@ class SOnExceptionComplexRouteTest extends OnExceptionComplexRouteTest with Rout
     }.maximumRedeliveries(2).handled
 
     "direct:start" ==> {
+      routeId("start")
+
       handle[MyFunctionalException]{
       }.maximumRedeliveries(0)
 
@@ -59,6 +61,8 @@ class SOnExceptionComplexRouteTest extends OnExceptionComplexRouteTest with Rout
     }
 
     "direct:start2" ==> {
+      routeId("start2")
+
       handle[MyFunctionalException] {
         to("mock:handled")
       }.maximumRedeliveries(0).handled