camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <>
Subject [jira] Commented: (CAMEL-1117) improve Java DSL to reduce methods in ProcessorType
Date Thu, 18 Dec 2008 08:58:05 GMT


Willem Jiang commented on CAMEL-1117:

Yes,  we could reduce the Splitter and Aggregator relates DSL in ProcessorType, by add the
detail optional  DSL in the sub type class of PorcessorType.
It may take a while to finish this task, lots for method need to be went through :)

> improve Java DSL to reduce methods in ProcessorType
> ---------------------------------------------------
>                 Key: CAMEL-1117
>                 URL:
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
> Hi
> Most of the Java DSL is defined in
> org.apache.camel.model.ProcessorType so when you hit ctrl+space when
> creating routes in Java DSL you get a list of 159 methods.
> I have noticed during improving the javadoc that we overload the
> methods to often, instead of having a few sensible defaults that
> tailing 95% useage and then delegate the special customization to it's
> own type where the fluent builder can offer the special methods.
> For instance the splitter EIP has 12 methods to offer all kind of
> combination of parameters. I think we should refactor this to allow
> 1-3 methods that should cater most usage and then add fluent builder
> methods on the SplitterType so end user can do the special
> customization there, where we can use good fluent builder methods
> names (eg to enable something instead of true, it's parallel() then
> it's much more readable
> Before:
> {code}
> from("xxx").splitter(body().tokenize(","), true, myPool).to("yyy");
> {code}
> After:
> {code}
> from("xxx").splitter(body().tokenize(",")).parrallel().threadPool(myPool).to("yyy");
> {code}
> See nabble:

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message