camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mashrur <mashr...@gmail.com>
Subject Polling for file copying using dynamic filenames
Date Fri, 14 Aug 2015 01:29:39 GMT
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.

Mime
View raw message