You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Shashank (JIRA)" <ji...@apache.org> on 2016/05/16 09:14:13 UTC

[jira] [Commented] (SSHD-108) Add upload monitoring to sftp

    [ https://issues.apache.org/jira/browse/SSHD-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15284286#comment-15284286 ] 

Shashank commented on SSHD-108:
-------------------------------

Hi all,

I am currently using SSHD1.1.0 version and trying to achieve following functionality

Requirement: 
   Whenever transfer of a file is aborted, need to log/send a specific message..

Approach:
 Created custom SftpEventListener and attached to SftpSubSystemFactory instance.

Observed:
 Whenever a file transfer is completed (either Successful or Unsuccessfull) notification is received at SftpEventListener. BUT no parameter is available to indicate/distinguish a successful transfer from unsuccessful transfer.

After going through SftpEventListener API documentation, whenever file transfer is completed either successful or unsuccessful close method in SftpEventListener is invoked to notify file that File has been closed.

Could someone suggest is there any way to identify the requests in SFTP server which are aborted?

> Add upload monitoring to sftp
> -----------------------------
>
>                 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
>            Assignee: Goldstein Lyor
>            Priority: Minor
>             Fix For: 1.1.0
>
>
> 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)