Class AbstractOptimisedTask<TARGET,LOCALFILE>

java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
com.sshtools.common.ssh.ConnectionAwareTask
All Implemented Interfaces:
com.sshtools.common.ssh.RequestFuture, Runnable
Direct Known Subclasses:
PullTask, PushTask

public abstract class AbstractOptimisedTask<TARGET,LOCALFILE> extends AbstractFileTask
  • 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

      protected final RemoteHash digest
    • ignoreIntegrity

      protected final boolean ignoreIntegrity
    • primarySftpClient

      protected final SftpClient primarySftpClient
    • progressMessages

      protected final Optional<AbstractOptimisedTask.ProgressMessages> progressMessages
    • chunkProgress

      protected final Function<LOCALFILE,FileTransferProgress> chunkProgress
    • clients

      protected final LinkedList<SshClient> clients
    • verboseOutput

      protected final boolean verboseOutput
  • Constructor Details

  • Method Details

    • doTask

      public final void doTask()
      Specified by:
      doTask in class com.sshtools.common.ssh.ConnectionAwareTask
    • transferFiles

      protected abstract void transferFiles(TARGET targetFolder) throws com.sshtools.common.sftp.SftpStatusException, com.sshtools.common.ssh.SshException, TransferCancelledException, IOException, com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.ssh.ChannelOpenException
      Throws:
      com.sshtools.common.sftp.SftpStatusException
      com.sshtools.common.ssh.SshException
      TransferCancelledException
      IOException
      com.sshtools.common.permissions.PermissionDeniedException
      com.sshtools.common.ssh.ChannelOpenException
    • displayMessage

      protected final void displayMessage(String message, Object... args)
    • verboseMessage

      protected final void verboseMessage(String message, Object... args)
    • configureConnections

      protected final void configureConnections() throws IOException, com.sshtools.common.ssh.SshException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
    • configureTargetFolder

      protected abstract TARGET configureTargetFolder() throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.sftp.SftpStatusException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
      com.sshtools.common.permissions.PermissionDeniedException
      com.sshtools.common.sftp.SftpStatusException
    • checkErrors

      protected final void checkErrors(Collection<Throwable> errors) throws IOException, TransferCancelledException
      Throws:
      IOException
      TransferCancelledException
    • printChunkMessages

      protected final void printChunkMessages(long chunkLength)
    • verifyIntegrity

      protected final void verifyIntegrity(Path localPath, String remotePath) throws com.sshtools.common.ssh.SshException, com.sshtools.common.sftp.SftpStatusException, IOException, com.sshtools.common.permissions.PermissionDeniedException
      Throws:
      com.sshtools.common.ssh.SshException
      com.sshtools.common.sftp.SftpStatusException
      IOException
      com.sshtools.common.permissions.PermissionDeniedException