camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: issues with simple example
Date Mon, 28 Jan 2013 22:50:35 GMT
Check out the camel file component documentation about the different
options [1]. The option you are looking for is "noop".
I don't understand what do you mean with "which endpoint will be suitable
to give this list as an input"? You can transform / split / ... your
payload to whatever type you need. You use an endpoint to interact with
other protocols/technologies.

[1] http://camel.apache.org/file2.html

Best,
Christian

On Mon, Jan 28, 2013 at 7:11 AM, AMARNATH, Balachandar <
BALACHANDAR.AMARNATH@airbus.com> wrote:

> Hello,
>
> Thanks for the help,
>
> Now, I need to pass a set of strings (say, in a arrayList). This list need
> to be processed by the processor code. Now, which endpoint will be suitable
> to give this list as an input?
> Further, I have observed that when I use an endpoint like this
> 'from::<loc_of_file>', at the end, the file is removed from the location.
> What is the way to prevent this behaviour?
>
>
> With regards
> Balachandar
>
> -----Original Message-----
> From: Christian Müller [mailto:christian.mueller@gmail.com]
> Sent: 25 January 2013 01:47
> To: users@camel.apache.org
> Subject: Re: issues with simple example
>
> The file endpoint should be a directory and not a file.
>
> Sent from a mobile device
> Am 24.01.2013 12:33 schrieb "AMARNATH, Balachandar" <
> BALACHANDAR.AMARNATH@airbus.com>:
>
> > I am new to camel and trying to run a simple example. I have the
> following
> > classes constitute a simple route which I am not able to run it.
> >
> > public class CamelStarter {
> >
> >         /**
> >          * @param args
> >          */
> >         public static void main(String[] args) throws Exception {
> >                 // TODO Auto-generated method stub
> >                 CamelContext context = new DefaultCamelContext();
> >                 context.addRoutes((RoutesBuilder) new
> IntegrationRoute());
> >                 context.start();
> >                 context.stop();
> >
> >         }
> >
> > }
> >
> >
> > public class IntegrationRoute extends RouteBuilder {
> >
> >         @Override
> >         public void configure() throws Exception {
> >                 from("file:///home/bala/input.txt").process(new
> > simpleProcessor()).toString();
> >
> >         }
> >
> > }
> >
> > public class simpleProcessor implements Processor {
> >
> >         @Override
> >         public void process(Exchange arg0) throws Exception {
> >                 // TODO Auto-generated method stub
> >                 System.out.println("Received
> > "+arg0.getIn().getBody(String.class));
> >         }
> >
> > }
> >
> >
> > I compiled all the classes and ran CamelStarter class. It goes to the
> > configure() method and after that, I am not seeing any more output. No
> > error. I expect the code in process() be executed and print something
> which
> > is not happening.
> > Can someone give me a hint here?
> >
> >
> > Many thanks and regards
> > Bala
> >
> >
> >
> > With thanks and regards
> > Balachandar
> >
> >
> >
> >
> > The information in this e-mail is confidential. The contents may not be
> > disclosed or used by anyone other than the addressee. Access to this
> e-mail
> > by anyone else is unauthorised.
> > If you are not the intended recipient, please notify Airbus immediately
> > and delete this e-mail.
> > Airbus cannot accept any responsibility for the accuracy or completeness
> > of this e-mail as it has been sent over public networks. If you have any
> > concerns over the content of this message or its Accuracy or Integrity,
> > please contact Airbus immediately.
> > All outgoing e-mails from Airbus are checked using regularly updated
> virus
> > scanning software but you should take whatever measures you deem to be
> > appropriate to ensure that this message and any attachments are virus
> free.
> >
> >
>
> This mail has originated outside your organization, either from an
> external partner or the Global Internet.
> Keep this in mind if you answer this message.
>
>
>
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other than the addressee. Access to this e-mail
> by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately
> and delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or completeness
> of this e-mail as it has been sent over public networks. If you have any
> concerns over the content of this message or its Accuracy or Integrity,
> please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated virus
> scanning software but you should take whatever measures you deem to be
> appropriate to ensure that this message and any attachments are virus free.
>
>


--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message