camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Chaffee (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5795) Scala DSL Examples
Date Fri, 16 Nov 2012 08:28:13 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498674#comment-13498674
] 

Jason Chaffee commented on CAMEL-5795:
--------------------------------------

Here is one example,

Java Example:

{code}
from("direct:a").unmarshal().gzip().to("mock:a");
{code}

To accomplish the same thing in Scala it is not easy to figure out and it is quite different.

Scala Example,

{code}
import org.apache.camel.model.dataformat.GzipDataFormat

from("direct:a").unmarshal(new GzipDataFormat()).to("mock:a");
{code}

Normally, you would expect to use this class:

{code}
import org.apache.camel.impl.GzipDataFormat
{code}

It is very confusing and there is no documentation on this.  

                
> Scala DSL Examples
> ------------------
>
>                 Key: CAMEL-5795
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5795
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.10.2
>            Reporter: Jason Chaffee
>
> There are very few Scala DSL examples for the components, only Java.  However, in many
cases the Java DSL is very different than the Scala DSL and it is not easy to figure out how
to accomplish the same thing in Scala.  
> Therefore, I feel there should always be a Java example, a xml example, and a Scala exaample.
 
> I can add examples of differences between Java and Scala if needed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message