I have following route class
public class FileReaderRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("file:{{file.encrypt.source}}?noop=true;delete=true")
.setProperty("fileName", simple("${in.header.CamelFileName}")).log("File Reader Route route started")
.to("direct:addSignatureRoute");
}
}
I have loaded above route using springboot. So if i run the application, route get started and start reading files in given location.
My requirement is to start and stop the route on runtime ie After running the application. route must be started only if i send request to that application on demand and stop the route by sending request to the running app.