...
The following Camel components supports the Rest DSL. See the bottom of this page for how to integrate a component with the Rest DSL.
Rest DSL with Java
To use the Rest DSL in Java then just do as with regular Camel routes by extending the RouteBuilder
and define the routes in the configure
method.
...
Any Apache Camel component can integrate with the Rest DSL if they can be used as a REST service (eg as a REST consumer in Camel lingo). To integrate with the Rest DSL, then the component should implement the org.apache.camel.spi.RestConsumerFactory
. The Rest DSL will then invoke the createConsumer
method when it setup the Camel routes from the defined DSL. The component should then implement logic to create a Camel consumer that exposes the REST services based on the given parameters, such as path, verb, and other options. For example see the source code for camel-restlet, camel-spark-rest.
See Also
DSL
Rest
Restlet
Spark-rest