Class PullTask

java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
All Implemented Interfaces:
com.sshtools.common.ssh.RequestFuture, Runnable

public final class PullTask extends AbstractOptimisedTask<Path,String>
An SFTP Task that downloads complete paths in multiple chunks concurrently. You cannot directly create a PullTask, instead use PullTask.PullTaskBuilder.
 client.addTask(PullTaskBuilder.create().
                withPaths("a/b/c.txt", "/d/e/f/g.txt").
                withLocalFolder("/path/on/local").
                withChunks(5).
                build());
 
  • Method Details

    • transferFiles

      protected void transferFiles(Path target) throws com.sshtools.common.sftp.SftpStatusException, com.sshtools.common.ssh.SshException, TransferCancelledException, IOException, com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.ssh.ChannelOpenException
      Specified by:
      transferFiles in class AbstractOptimisedTask<Path,String>
      Throws:
      com.sshtools.common.sftp.SftpStatusException
      com.sshtools.common.ssh.SshException
      TransferCancelledException
      IOException
      com.sshtools.common.permissions.PermissionDeniedException
      com.sshtools.common.ssh.ChannelOpenException
    • configureTargetFolder

      protected Path configureTargetFolder() throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.sftp.SftpStatusException
      Specified by:
      configureTargetFolder in class AbstractOptimisedTask<Path,String>
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
      com.sshtools.common.permissions.PermissionDeniedException
      com.sshtools.common.sftp.SftpStatusException