Apache MINA SFTP - add callback methods after successful file transfers

577 views Asked by At

Am using Apache Mina to build my own SFTP server. I want to notify a server automatically after each file transfer is complete. Please help me with some pointers in this direction.

Ideally, there should be an interface that I need to implement and a class where I need to register my call back function. I know that Apache MIna SSHD uses Apache Mina under the hood which has IO events, handlers and filters to accomplish this.

I am looking for something more concrete. Classes and method names to register my callback function would be pretty helpful.

1

There are 1 answers

0
Bob Hemolack On

I tried something similar using an earlier version of Mina SSHD. I ended up creating my own implementation of FileSystemFactory, FileSystemView, and SshFile. The SshFile interface has callback methods for create(), delete(), createOutputStream(), etc. If someone has a simpler, more elegant solution I would be very interested to see it.