I currently have a route which is triggered by the arrival of a file in a specific folder. The file then is parsed using Bindy DataFormat and the resulting objects processed by myProcessor:
from(inboundFile)
.log("Processing: ${file:name}")
.unmarshal(bindy)
.process(myProcessor)
.end()
Now I want to change the route so it's a direct route triggered by a restful. Is there a way I can keep using Bindy for parsing the file or do I have to write my own parser/unmarshal in a custom processor?
from("direct:myRoute")
.log("Processing file")
// What can I do here other than writing my own processor that loads and processes the file?>
.unmarshal(bindy)
.process(myProcessor)
.end()