camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > DSL
Date Mon, 07 Jan 2013 11:38:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/DSL">DSL</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~davsclaus">Claus
Ibsen</a>
    </h4>
        <br/>
                         <h4>Changes (4)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >h2. Java DSL <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Camel
uses a Java _Domain Specific Language_ or DSL for creating [Enterprise Integration Patterns]
or [Routes]. Camel also supports a [Spring based XML configuration|Xml Configuration] as well
as a [Scala DSL]. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Camel
uses a Java _Domain Specific Language_ or DSL for creating [Enterprise Integration Patterns]
or [Routes] in a variety of domain-specific languages (DSL) as listed below. <br>* Java
DSL - A Java based DSL using the fluent builder style. <br>* Spring XML - A XML based
DSL in Spring XML files <br>* Blueprint XML - A XML based DSL in OSGi Blueprint XML
files <br>* Groovy DSL - A Groovy based DSL using Groovy programming language <br>*
Scala DSL - A Scala based DSL using Scala programming language <br>* Kotlin DSL - *Work
in progress* - Currently developed outside ASF, but will we included later in Camel when Kotlin
and the DSL is ready. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The
benefits of using the Java DSL is that your IDE can smart complete your code as you start
typing, rather than having to mess around with buckets of XML. The Java DSL is also very expressive
as you can mix and match your own code within the language for [Expression] or [Predicate]
evaluations or easily add a custom [Processor].  <br> <br></td></tr>
            <tr><td class="diff-unchanged" >The main entry points for the DSL
are <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* [RouteBuilder] for creating a collection
of routes using the routing DSL <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3.
Handling errors <br> <br>You can handle errors in a number of ways such as: <br>*
by specifying an [Error Handler] <br>* using the [Exception Clause] via the *exception()*
method <br> <br>Camel uses a strategy to resolve how exceptions should be handled.
 <br> <br> <br>h3. Using try ... catch ... finally <br> <br>See
[Try Catch Finally] <br> <br> <br>h3. Using Interceptors <br> <br>See
[Intercept] <br> <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h3. See Also <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="DSL-JavaDSL"></a>Java DSL</h2>

<p>Camel uses a Java <em>Domain Specific Language</em> or DSL for creating
<a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration
Patterns">Enterprise Integration Patterns</a> or <a href="/confluence/display/CAMEL/Routes"
title="Routes">Routes</a> in a variety of domain-specific languages (DSL) as listed
below.</p>
<ul>
	<li>Java DSL - A Java based DSL using the fluent builder style.</li>
	<li>Spring XML - A XML based DSL in Spring XML files</li>
	<li>Blueprint XML - A XML based DSL in OSGi Blueprint XML files</li>
	<li>Groovy DSL - A Groovy based DSL using Groovy programming language</li>
	<li>Scala DSL - A Scala based DSL using Scala programming language</li>
	<li>Kotlin DSL - <b>Work in progress</b> - Currently developed outside
ASF, but will we included later in Camel when Kotlin and the DSL is ready.</li>
</ul>


<p>The main entry points for the DSL are</p>

<ul>
	<li><a href="/confluence/display/CAMEL/CamelContext" title="CamelContext">CamelContext</a>
for creating a Camel routing rulebase</li>
	<li><a href="/confluence/display/CAMEL/RouteBuilder" title="RouteBuilder">RouteBuilder</a>
for creating a collection of routes using the routing DSL</li>
</ul>


<h3><a name="DSL-SeeAlso"></a>See Also</h3>

<p>For more examples of the DSL in action see</p>

<ul>
	<li><a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise
Integration Patterns">Enterprise Integration Patterns</a></li>
	<li><a href="/confluence/display/CAMEL/Examples" title="Examples">Examples</a></li>
	<li><a href="/confluence/display/CAMEL/Routes" title="Routes">Routes</a></li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/DSL">View Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=49248&revisedVersion=22&originalVersion=21">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/DSL?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message