2
votes

I have a requirement to develop an SFTP adapter which will download files from a remote location. This process will be scheduled using a quartz scheduler and the schedule time will be set from a gui. I was initially using spring SFTP inbound adapter but I realized that it is a poller consumer. However I want it to be invoked by my quartz scheduler instead of the poller. Could it be done? Can I make my SFTP inbound adapter event driven instead of poller driven?

1

1 Answers

0
votes

No, but you have a few options...

  1. Use outbound-gateway(s) instead; you can use one gateway to list (ls) the remote directory, followed by a <splitter/> and another outbound gateway to get the files; a third gateway can then rm the remote file(s). There's an example of that in the SFTP Sample App Or, you can use a single <outbound-gateway/> to mget all the files matching a pattern (e.g. /foo/*.txt).

  2. Use the technique I described in this answer.