[
https://issues.apache.org/activemq/browse/CAMEL-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Willem Jiang resolved CAMEL-1117.
---------------------------------
Resolution: Fixed
@Claus
Thanks for polishing the codes.
I think we can close it now.
If we want to keep on cleaning the ProcessorType DSL methods , we could fill a
new JIRA for it.
> improve Java DSL to reduce methods in ProcessorType
> ---------------------------------------------------
>
> Key: CAMEL-1117
> URL: https://issues.apache.org/activemq/browse/CAMEL-1117
> 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:
> http://www.nabble.com/-PROPOSAL----Camel-2.0---improve-Java-DSL-to-reduce-methods-in-ProcessorType-tt20676775s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.