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.