[ https://issues.apache.org/jira/browse/SSHD-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14340475#comment-14340475 ]
David Evans commented on SSHD-108: ---------------------------------- I'm personally not too worried about paused uploads; it's only aborted or failed uploads which matter to me (I don't even care which type of failure it is; that's just a logging nicety), and from my tests both of those events are reliably different from a successful upload. I can understand not wanting to add heuristics into the library, but right now the relevant information (pipe closed / connection reset exception) is being swallowed at a low level, meaning users can't implement heuristics in an I-know-the-risks manner without editing the library code. An alternative, therefore, would be to notify the listener about pipe closed and connection reset events. It would take a bit more work for me as a user to match that with particular uploads, but it means the library can stay pure (i.e. report what is happening with no guesses on what that might mean). An upload-maybe-finished callback already exists (the stream's close method), and as long as the new listener methods are called before the stream is closed, it will suffice. But it might be nice to add a listener event too (for users who don't need custom streams) > Add upload monitoring to sftp and scp > ------------------------------------- > > Key: SSHD-108 > URL: https://issues.apache.org/jira/browse/SSHD-108 > Project: MINA SSHD > Issue Type: Improvement > Affects Versions: 0.5.0 > Reporter: Richard Evans > Priority: Minor > > We have sshd integrated into our application and sftp is working fine. One > of the requirements is to initiate some action when a file upload it > complete. I have made this work by implementing handleClose in my SshFile > implementation and performing the action if createOutputStream had been > called previously. This seems a bit ugly though; it might be nicer if there > was some plug in mechanism to monitor file transfers. > Ideally the monitor would be able to distinguish between a successful upload > and a cancelled one (via ctrl-c at the client), but a quick perusal of the > sftp stuff seems to inidicate that this is not possible. -- This message was sent by Atlassian JIRA (v6.3.4#6332)