I'd like to setup a spring bean (either via interface or bean class). that I can call to "start" a Route.
In this simple example when I call sayHello("world") from code I'd like it to route the return value of the sayHello method the endpoint that will write it out to a file.
Does anyone know if this is possible, or how to go about this? I know I can expose that same interface via CXF and make this work, but I really just want to call a method, not go through the trouble of sending a jms message or calling a webservice.
public interface Hello{
public String sayHello(String value);
}
from("bean:helloBean").to("file:/data/outbox?fileName=hello.txt");