Package com.sshtools.client.tasks
Class AbstractOptimisedTask<TARGET,LOCALFILE>
java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
com.sshtools.common.ssh.ConnectionAwareTask
com.sshtools.client.tasks.Task
com.sshtools.client.tasks.AbstractConnectionTask
com.sshtools.client.tasks.AbstractFileTask
com.sshtools.client.tasks.AbstractOptimisedTask<TARGET,LOCALFILE>
- All Implemented Interfaces:
RequestFuture,Runnable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstractOptimisedTask.AbstractOptimisedTaskBuilder<B extends AbstractOptimisedTask.AbstractOptimisedTaskBuilder<B,T, LOCALFILE>, T extends AbstractOptimisedTask<?, ?>, LOCALFILE> protected static classstatic interfaceInterface to be implemented by classes that monitor the progress of file transfers and output feedback.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
FieldsModifier and TypeFieldDescriptionprotected final intprotected final intprotected final Function<LOCALFILE,FileTransferProgress> protected final intprotected final LinkedList<SshClient>protected final RemoteHashprotected final booleanprotected final intprotected final SftpClientprotected final Optional<AbstractOptimisedTask.ProgressMessages>protected final booleanprotected final booleanFields 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
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcheckErrors(Collection<Throwable> errors) protected final voidprotected abstract TARGETprotected final voiddisplayMessage(String message, Object... args) final voiddoTask()protected final voidprintChunkMessages(long chunkLength) protected abstract voidtransferFiles(TARGET targetFolder) protected final voidverboseMessage(String message, Object... args) protected final voidverifyIntegrity(Path localPath, String remotePath) 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
-
Field Details
-
chunks
protected final int chunks -
blocksize
protected final int blocksize -
buffersize
protected final int buffersize -
outstandingRequests
protected final int outstandingRequests -
verifyIntegrity
protected final boolean verifyIntegrity -
digest
-
ignoreIntegrity
protected final boolean ignoreIntegrity -
-
progressMessages
-
chunkProgress
-
clients
-
verboseOutput
protected final boolean verboseOutput
-
-
Constructor Details
-
AbstractOptimisedTask
protected AbstractOptimisedTask(AbstractOptimisedTask.AbstractOptimisedTaskBuilder<?, ?, LOCALFILE> builder)
-
-
Method Details
-
doTask
public final void doTask()- Specified by:
doTaskin classConnectionAwareTask
-
transferFiles
protected abstract void transferFiles(TARGET targetFolder) throws SftpStatusException, SshException, TransferCancelledException, IOException, PermissionDeniedException, ChannelOpenException -
displayMessage
-
verboseMessage
-
configureConnections
- Throws:
IOExceptionSshException
-
configureTargetFolder
protected abstract TARGET configureTargetFolder() throws IOException, SshException, PermissionDeniedException, SftpStatusException -
checkErrors
protected final void checkErrors(Collection<Throwable> errors) throws IOException, TransferCancelledException -
printChunkMessages
protected final void printChunkMessages(long chunkLength) -
verifyIntegrity
protected final void verifyIntegrity(Path localPath, String remotePath) throws SshException, SftpStatusException, IOException, PermissionDeniedException
-