You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mashrur <ma...@gmail.com> on 2015/08/14 03:29:39 UTC

Polling for file copying using dynamic filenames

I have separate encapsulated logic and information in db to decide the
filenames to be copied. And, also I need this to start at a certain time
triggered by a scheduler, and start polling.
So, far I have achieved only first part of this, using the code below:

I have this:

from("direct:start")
        .bean(FileNameRetriever.class)
        .split(body())
          .to("file:///path/directory/?fileName=$simple{body.getName}");

And, inside FileNameRetriever,

public class FileNameRetriever {

	@Handler
	public List<File> getFileLoadInformationList() {
		List<File> fileinfos = new ArrayList<File>();
		// some logic and db interaction to decide the filenames
		return fileinfos;
	}

Any suggestion how to inject polling parameter (delay?) here?
Hope I get your attention and get some response :)
Thanks in advance
Mashrur




--
View this message in context: http://camel.465427.n5.nabble.com/Polling-for-file-copying-using-dynamic-filenames-tp5770702.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Polling for file copying using dynamic filenames

Posted by Mashrur <ma...@gmail.com>.
I got my own answer:

....
.bean(FileNameRetriever.class)
        .split(body())
        .pollEnrich("file://"+ getFolderLocation() +
"/?fileName=${body.getFileName}&noop=true")
	    .to("file:///path/directory/?fileName=${body.getFileName}");

But, I wonder, whether anybody even checked my question at all! View counts
are only for my own 
visits :(



--
View this message in context: http://camel.465427.n5.nabble.com/Polling-for-file-copying-using-dynamic-filenames-tp5770702p5770706.html
Sent from the Camel - Users mailing list archive at Nabble.com.