+1

It can be more readable, specially compares to the boolean argument of
the splitter construction ;)

Willem

Claus Ibsen wrote:
> 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:
> from("xxx").splitter(body().tokenize(","), true, myPool).to("yyy");
> 
> After:
> from("xxx").splitter(body().tokenize(",")).parrallel().threadPool(myPool).to("yyy");
> 
> 
> 
> /Claus Ibsen
> Apache Camel Committer
> Blog: http://davsclaus.blogspot.com/
> 

Reply via email to