Package com.sshtools.client.tasks
Class DownloadFileTask
- All Implemented Interfaces:
RequestFuture,Runnable
An SFTP
Task that downloads complete files.
You cannot directly create a DownloadFileTask, instead use DownloadFileTask.DownloadFileTaskBuilder.
client.addTask(DownloadFileTaskBuilder.create().
withLocalFile(new File("local.txt")).
withRemotePath("/path/to/remote.txt").
build());
-
Nested Class Summary
Nested ClassesNested 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.AbstractFileTask
progressFields inherited from class com.sshtools.client.tasks.AbstractConnectionTask
clientSupplierFields inherited from class com.sshtools.common.ssh.ConnectionAwareTask
con, lastError -
Constructor Summary
ConstructorsConstructorDescriptionDownloadFileTask(Connection<SshClientContext> con, String path) Deprecated, for removal: This API element is subject to removal in a future version.DownloadFileTask(Connection<SshClientContext> con, String path, File localFile) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Methods inherited from class com.sshtools.client.tasks.AbstractFileTask
doTaskUntilDoneMethods inherited from class com.sshtools.client.tasks.Task
ofRunnableMethods inherited from class com.sshtools.common.ssh.ConnectionAwareTask
getLastError, runMethods inherited from class com.sshtools.common.ssh.AbstractRequestFuture
addFutureListener, done, isDone, isSuccess, waitFor, waitForeverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sshtools.common.ssh.RequestFuture
isDoneAndSuccess
-
Constructor Details
-
DownloadFileTask
@Deprecated(forRemoval=true, since="3.1.0") public DownloadFileTask(Connection<SshClientContext> con, String path, File localFile) Deprecated, for removal: This API element is subject to removal in a future version.Construct a new download local task. Deprecated since 3.1.0. Use aDownloadFileTask.DownloadFileTaskBuilderinstead.- Parameters:
con- connectionpath- pathlocalFile- local local- See Also:
-
DownloadFileTask
@Deprecated(forRemoval=true, since="3.1.0") public DownloadFileTask(Connection<SshClientContext> con, String path) Deprecated, for removal: This API element is subject to removal in a future version.Construct a new download local task. Deprecated since 3.1.0. Use aDownloadFileTask.DownloadFileTaskBuilderinstead.- Parameters:
con- connectionpath- path- See Also:
-
-
Method Details
-
doTask
public void doTask()- Specified by:
doTaskin classConnectionAwareTask
-
getDownloadedFile
-