Package com.sshtools.client.tasks
Class PullTask
java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
com.sshtools.common.ssh.ConnectionAwareTask
- All Implemented Interfaces:
com.sshtools.common.ssh.RequestFuture
,Runnable
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());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.sshtools.client.tasks.AbstractOptimisedTask
AbstractOptimisedTask.AbstractOptimisedTaskBuilder<B extends AbstractOptimisedTask.AbstractOptimisedTaskBuilder<B,
T, LOCALFILE>, T extends AbstractOptimisedTask<?, ?>, LOCALFILE>, AbstractOptimisedTask.FileTransferProgressWrapper, AbstractOptimisedTask.ProgressMessages Nested classes/interfaces inherited from class com.sshtools.client.tasks.AbstractFileTask
AbstractFileTask.AbstractFileTaskBuilder<B extends AbstractFileTask.AbstractFileTaskBuilder<B,
T>, T extends AbstractConnectionTask> Nested classes/interfaces inherited from class com.sshtools.client.tasks.AbstractConnectionTask
AbstractConnectionTask.AbstractConnectionTaskBuilder<B extends AbstractConnectionTask.AbstractConnectionTaskBuilder<B,
T>, T extends AbstractConnectionTask> Nested classes/interfaces inherited from class com.sshtools.client.tasks.Task
Task.TaskRunnable<T>
-
Field Summary
Fields inherited from class com.sshtools.client.tasks.AbstractOptimisedTask
blocksize, buffersize, chunkProgress, chunks, clients, digest, ignoreIntegrity, outstandingRequests, primarySftpClient, progressMessages, verboseOutput, verifyIntegrity
Fields inherited from class com.sshtools.client.tasks.AbstractFileTask
progress
Fields inherited from class com.sshtools.client.tasks.AbstractConnectionTask
clientSupplier
Fields inherited from class com.sshtools.common.ssh.ConnectionAwareTask
con, lastError
-
Method Summary
Methods inherited from class com.sshtools.client.tasks.AbstractOptimisedTask
checkErrors, configureConnections, displayMessage, doTask, printChunkMessages, verboseMessage, verifyIntegrity
Methods inherited from class com.sshtools.client.tasks.AbstractFileTask
doTaskUntilDone
Methods inherited from class com.sshtools.client.tasks.Task
ofRunnable
Methods inherited from class com.sshtools.common.ssh.ConnectionAwareTask
getLastError, run
Methods inherited from class com.sshtools.common.ssh.AbstractRequestFuture
addFutureListener, done, isDone, isSuccess, waitFor, waitForever
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sshtools.common.ssh.RequestFuture
isDoneAndSuccess
-
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 classAbstractOptimisedTask<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 classAbstractOptimisedTask<Path,
String> - Throws:
IOException
com.sshtools.common.ssh.SshException
com.sshtools.common.permissions.PermissionDeniedException
com.sshtools.common.sftp.SftpStatusException
-