camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Jboss 7 and camel -bindy 2.10
Date Wed, 10 Oct 2012 05:55:51 GMT
Hi



On Wed, Oct 10, 2012 at 6:46 AM, Elezabeth <Elezabeth.gregory@ibsplc.com> wrote:
> Hi Claus,
>
> This is my route Builder class.
>
> package jp.co.airlink.gavss.adapter.eai.oag;
>
> import org.apache.camel.Exchange;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat;
> import org.apache.camel.model.dataformat.BindyType;
> import org.apache.camel.spi.DataFormat;
>
> /**
>  * @author A-4050
>  */
> public class OagRouteBuilder extends RouteBuilder {
>
>     //DataFormat bindy =  new
> BindyCsvDataFormat("jp.co.airlink.gavss.adapter.eai.oag");
>
>     Exchange exchnge = null;
>     String fileName = null;
>
>     @Override
>     public void configure() throws Exception {
>
> from("servlet:///camel?matchOnUriPrefix=true").inOnly("seda:myfile");
>         from("seda:myfile").inOnly("bean:fileConsumer?method=consumeFile")
>
> .split().tokenize("\n",2000).streaming().unmarshal().bindy(BindyType.Csv,
> "jp.co.airlink.gavss.adapter.eai.oag")

Instead of the package name "jp.co.airlink.gavss.adapter.eai.oag", you
can specify the class type, eg supports the class is name MyClass then
its
.bindy(BindyType.Csv, MyClass.class)


>                 .to("bean:validateFileInput?method=receiveOagData");
>
>
>     }
> }
>
>
>
> -----
> Thanks & Regards
> Elz
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jboss-7-and-camel-bindy-2-10-tp5720739p5720825.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: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message