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?
2
votes
1 Answers
0
votes
No, but you have a few options...
Use
outbound-gateway
(s) instead; you can use one gateway to list (ls
) the remote directory, followed by a<splitter/>
and another outbound gateway toget
the files; a third gateway can thenrm
the remote file(s). There's an example of that in the SFTP Sample App Or, you can use a single<outbound-gateway/>
tomget
all the files matching a pattern (e.g./foo/*.txt
).Use the technique I described in this answer.