Interface SftpClientFactory

    • Method Detail

      • createSftpClient

        default SftpClient createSftpClient​(ClientSession session)
                                     throws java.io.IOException
        Create an SFTP client from this session.
        Parameters:
        session - The ClientSession to be used for creating the SFTP client
        Returns:
        The created SftpClient
        Throws:
        java.io.IOException - if failed to create the client
      • createSftpClient

        default SftpClient createSftpClient​(ClientSession session,
                                            int version)
                                     throws java.io.IOException
        Creates an SFTP client using the specified version
        Parameters:
        session - The ClientSession to be used for creating the SFTP client
        version - The version to use - Note: if the specified version is not supported by the server then an exception will occur
        Returns:
        The created SftpClient
        Throws:
        java.io.IOException - If failed to create the client or use the specified version
      • createSftpFileSystem

        default SftpFileSystem createSftpFileSystem​(ClientSession session)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • createSftpFileSystem

        default SftpFileSystem createSftpFileSystem​(ClientSession session,
                                                    int version)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • createSftpFileSystem

        default SftpFileSystem createSftpFileSystem​(ClientSession session,
                                                    int version,
                                                    int readBufferSize,
                                                    int writeBufferSize)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • createSftpFileSystem

        default SftpFileSystem createSftpFileSystem​(ClientSession session,
                                                    int readBufferSize,
                                                    int writeBufferSize)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • createSftpFileSystem

        SftpFileSystem createSftpFileSystem​(ClientSession session,
                                            SftpVersionSelector selector,
                                            int readBufferSize,
                                            int writeBufferSize)
                                     throws java.io.IOException
        Parameters:
        session - The ClientSession to which the SFTP client backing the file system should be attached
        selector - The SftpVersionSelector to use in order to negotiate the SFTP version
        readBufferSize - Default I/O read buffer size
        writeBufferSize - Default I/O write buffer size
        Returns:
        The created SftpFileSystem instance
        Throws:
        java.io.IOException - If failed to create the instance