Class SftpServer

  • All Implemented Interfaces:
    InitializingPhase, Named, ShutdownPhase, Endpoint, Server, com.consol.citrus.spi.ReferenceResolverAware, Runnable, EventListener, org.apache.sshd.common.util.SshdEventListener, org.apache.sshd.scp.common.ScpTransferEventListener, org.apache.sshd.sftp.server.SftpEventListener

    public class SftpServer
    extends SshServer
    implements org.apache.sshd.scp.common.ScpTransferEventListener, org.apache.sshd.sftp.server.SftpEventListener
    Since:
    2.7.6
    Author:
    Christoph Deppisch
    • Constructor Detail

      • SftpServer

        public SftpServer()
        Default constructor using default endpoint configuration.
      • SftpServer

        public SftpServer​(SftpEndpointConfiguration endpointConfiguration)
        Constructor using endpoint configuration.
        Parameters:
        endpointConfiguration -
    • Method Detail

      • startFileEvent

        public void startFileEvent​(org.apache.sshd.common.session.Session session,
                                   org.apache.sshd.scp.common.ScpTransferEventListener.FileOperation op,
                                   Path file,
                                   long length,
                                   Set<PosixFilePermission> perms)
        Specified by:
        startFileEvent in interface org.apache.sshd.scp.common.ScpTransferEventListener
      • startFolderEvent

        public void startFolderEvent​(org.apache.sshd.common.session.Session session,
                                     org.apache.sshd.scp.common.ScpTransferEventListener.FileOperation op,
                                     Path file,
                                     Set<PosixFilePermission> perms)
        Specified by:
        startFolderEvent in interface org.apache.sshd.scp.common.ScpTransferEventListener
      • initialized

        public void initialized​(org.apache.sshd.server.session.ServerSession session,
                                int version)
        Specified by:
        initialized in interface org.apache.sshd.sftp.server.SftpEventListener
      • reading

        public void reading​(org.apache.sshd.server.session.ServerSession session,
                            String remoteHandle,
                            org.apache.sshd.sftp.server.FileHandle localHandle,
                            long offset,
                            byte[] data,
                            int dataOffset,
                            int dataLen)
        Specified by:
        reading in interface org.apache.sshd.sftp.server.SftpEventListener
      • writing

        public void writing​(org.apache.sshd.server.session.ServerSession session,
                            String remoteHandle,
                            org.apache.sshd.sftp.server.FileHandle localHandle,
                            long offset,
                            byte[] data,
                            int dataOffset,
                            int dataLen)
        Specified by:
        writing in interface org.apache.sshd.sftp.server.SftpEventListener
      • destroying

        public void destroying​(org.apache.sshd.server.session.ServerSession session)
        Specified by:
        destroying in interface org.apache.sshd.sftp.server.SftpEventListener
      • getScpTransferEventListener

        protected org.apache.sshd.scp.common.ScpTransferEventListener getScpTransferEventListener()
        Overrides:
        getScpTransferEventListener in class SshServer
      • getSftpEventListener

        protected org.apache.sshd.sftp.server.SftpEventListener getSftpEventListener()
        Overrides:
        getSftpEventListener in class SshServer
      • setPort

        public void setPort​(int port)
        Overrides:
        setPort in class SshServer