Class SftpServerSubSystemEventListener

    • Constructor Detail

      • SftpServerSubSystemEventListener

        public SftpServerSubSystemEventListener​(org.slf4j.Logger logger)
    • Method Detail

      • initialized

        public void initialized​(ServerSession session,
                                int version)
                         throws java.io.IOException
        Description copied from interface: SftpEventListener
        Called when the SFTP protocol has been initialized
        Specified by:
        initialized in interface SftpEventListener
        Parameters:
        session - The ServerSession through which the request was handled
        version - The negotiated SFTP version
        Throws:
        java.io.IOException - If failed to handle the call
      • destroying

        public void destroying​(ServerSession session)
                        throws java.io.IOException
        Description copied from interface: SftpEventListener
        Called when subsystem is destroyed since it was closed
        Specified by:
        destroying in interface SftpEventListener
        Parameters:
        session - The associated ServerSession
        Throws:
        java.io.IOException - If failed to handle the call
      • created

        public void created​(ServerSession session,
                            java.nio.file.Path path,
                            java.util.Map<java.lang.String,​?> attrs,
                            java.lang.Throwable thrown)
                     throws java.io.IOException
        Description copied from interface: SftpEventListener
        Called after creating a directory
        Specified by:
        created in interface SftpEventListener
        Parameters:
        session - The ServerSession through which the request was handled
        path - Directory Path to be created
        attrs - Requested associated attributes to set
        thrown - If not-null then the reason for the failure to execute
        Throws:
        java.io.IOException - If failed to handle the call
      • moved

        public void moved​(ServerSession session,
                          java.nio.file.Path srcPath,
                          java.nio.file.Path dstPath,
                          java.util.Collection<java.nio.file.CopyOption> opts,
                          java.lang.Throwable thrown)
                   throws java.io.IOException
        Description copied from interface: SftpEventListener
        Called after renaming a file / directory
        Specified by:
        moved in interface SftpEventListener
        Parameters:
        session - The ServerSession through which the request was handled
        srcPath - The source Path
        dstPath - The target Path
        opts - The resolved renaming options
        thrown - If not-null then the reason for the failure to execute
        Throws:
        java.io.IOException - If failed to handle the call
      • removed

        public void removed​(ServerSession session,
                            java.nio.file.Path path,
                            boolean isDirectory,
                            java.lang.Throwable thrown)
                     throws java.io.IOException
        Description copied from interface: SftpEventListener
        Called after a file has been removed
        Specified by:
        removed in interface SftpEventListener
        Parameters:
        session - The ServerSession through which the request was handled
        path - The Path to be removed
        isDirectory - Whether this was a folder or a file
        thrown - If not-null then the reason for the failure to execute
        Throws:
        java.io.IOException - If failed to handle the call