Hi

You can use the content based router to route to bean A or bean B
depending on some predicate.
eg like if ... else ...


On Mon, Feb 4, 2013 at 2:54 PM, kikou1984 <hichem.ouesl...@atos.net> wrote:
> Hi,
>
> I want to know if i can configure a splitter.
> Here an exemple :
>
> public static ArrayList <ArrayList <CLASS A>> methodTosplit(@Headers final
> Map<String, Object>     headers,Exchange exchange) {
>     ArrayList <ArrayList <CLASS A>> eclatLst = new ArrayList <ArrayList
> <DebitCredit>>();
>      ....
>     return eclatLst;
> }
>
> In the main prog:
>
>         .split()
>                 .method(myClass, "methodTosplit")
>                 .bean(myClassA, "methodA")
>                 .bean(myClassB, "methodB");
>
>
> So i can split the ArrayList <ArrayList <CLASS A>>  into many ArrayList
> <CLASS A> for each bean (myClassA, myClassB).
> However , can i split some ArratList into the bean bean(myClassA, "methodA")
> and not the other bean(myClassB, "methodB").
>
> Here an exemple:
> We suppose,  ArrayList <ArrayList <CLASS A>> got two ArrayList <CLASS A>.
> So the prog will split the first  ArrayList <CLASS A> to bean myClassA,
> myClassB. Then the second ArrayList <CLASS A> to the bean myClassA,
> myClassB.
>
> How can i configure the splitter, to get this for exemple :
> the first  ArrayList <CLASS A> to the bean myClassA only , Then the second
> ArrayList <CLASS A> to the bean myClassB only.
>
> I got a lead , using the Headers, but the context still the same for the
> spliter
>
> has anybody got an idea here?
>
> thxs.
>
>
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Splitter-with-option-tp5726900.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to