Class SimpleSftpClientImpl

    • Constructor Detail

      • SimpleSftpClientImpl

        public SimpleSftpClientImpl()
      • SimpleSftpClientImpl

        public SimpleSftpClientImpl​(SimpleClient client)
    • Method Detail

      • setClient

        public void setClient​(SimpleClient client)
      • setSftpClientFactory

        public void setSftpClientFactory​(SftpClientFactory sftpClientFactory)
      • sftpLogin

        public SftpClient sftpLogin​(java.net.SocketAddress target,
                                    java.lang.String username,
                                    java.lang.String password)
                             throws java.io.IOException
        Description copied from interface: SimpleSftpClient
        Creates an SFTP session using the provided credentials
        Specified by:
        sftpLogin in interface SimpleSftpClient
        Parameters:
        target - The target SocketAddress
        username - Username
        password - Password
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        public SftpClient sftpLogin​(java.net.SocketAddress target,
                                    java.lang.String username,
                                    java.security.KeyPair identity)
                             throws java.io.IOException
        Description copied from interface: SimpleSftpClient
        Creates an SFTP session using the provided credentials
        Specified by:
        sftpLogin in interface SimpleSftpClient
        Parameters:
        target - The target SocketAddress
        username - Username
        identity - The KeyPair identity
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • createSftpClient

        protected SftpClient createSftpClient​(ClientSession session)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface java.nio.channels.Channel
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException