Scala DSL - Getting Started has been edited by Hadrian Zbarcea (Jan 21, 2009).

(View changes)

Content:

Just like the Java DSL, the Scala DSL has a RouteBuilder (org.apache.camel.scala.builder.RouteBuilder) class that you have to extend to implement your own routes. This example shows you two very simple routes.

class MyRouteBuilder extends RouteBuilder {
  "direct:a" --> "mock:a"
  "direct:b" to "mock:b"      
}

If you compare this to the Java DSL, you notice:

  • there is no configure() method to override
  • a route starts directly with a URI instead of from(uri)
  • is just an alias for to

Reply via email to