Package com.sshtools.client.tasks
Class PushTask
- All Implemented Interfaces:
RequestFuture,Runnable
An SFTP
Task that uploads complete paths in multiple chunks
concurrently. You cannot directly create a PushTask, instead use
PushTask.PushTaskBuilder.
client.addTask(PushTaskBuilder.create().
withFilePaths("a/b/c.txt", "/d/e/f/g.txt").
withRemoteFolder("/path/on/remote").
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, verifyIntegrityFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected voidtransferFiles(String targetFolder) Methods inherited from class com.sshtools.client.tasks.AbstractOptimisedTask
checkErrors, configureConnections, displayMessage, doTask, printChunkMessages, verboseMessage, verifyIntegrityMethods 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
-
Method Details
-
transferFiles
protected void transferFiles(String targetFolder) throws SftpStatusException, SshException, TransferCancelledException, IOException, PermissionDeniedException, ChannelOpenException -
configureTargetFolder
protected String configureTargetFolder() throws IOException, SshException, PermissionDeniedException, SftpStatusException- Specified by:
configureTargetFolderin classAbstractOptimisedTask<String,AbstractFile> - Throws:
IOExceptionSshExceptionPermissionDeniedExceptionSftpStatusException
-