I have successfully set up Spring with SFTP integration, and am polling an SFTP server and pulling down files.
What I would like to know, is it possible for a task to be fired on each file once it's download has completed? I don't want to go down the road of filesystem watches - is there something built into Spring SFTP for this?
Having looked at the documentation, it looks like it can be achieved with Channels.
This is what my receiver channel currently looks like:
<int:channel id="receiveChannel">
<int:queue />
</int:channel>
I'm not sure what I need to do to fire a customer interceptor or similar.
Edit: from the Spring docs it says this:
It is also important to understand that SFTP Inbound Channel Adapter is a Polling Consumer and therefore you must configure a poller (either a global default or a local sub-element). Once the file has been transferred to a local directory, a Message with java.io.File as its payload type will be generated and sent to the channel identified by the channel attribute.
I'm not sure how to implement this - and can't find any examples.