Class AbstractConnectionTask.AbstractConnectionTaskBuilder<B extends AbstractConnectionTask.AbstractConnectionTaskBuilder<B,T>,T extends AbstractConnectionTask>

java.lang.Object
com.sshtools.client.tasks.AbstractConnectionTask.AbstractConnectionTaskBuilder<B,T>
Direct Known Subclasses:
AbstractFileTask.AbstractFileTaskBuilder, AbstractSessionTask.AbstractSessionTaskBuilder
Enclosing class:
AbstractConnectionTask

public abstract static class AbstractConnectionTask.AbstractConnectionTaskBuilder<B extends AbstractConnectionTask.AbstractConnectionTaskBuilder<B,T>,T extends AbstractConnectionTask> extends Object
  • Field Details

  • Constructor Details

    • AbstractConnectionTaskBuilder

      public AbstractConnectionTaskBuilder()
  • Method Details

    • withClient

      public B withClient(SshClient client)
      Set a single SshClient to use.
      Parameters:
      client - client
      Returns:
      builder for chaining
    • withConnection

      public B withConnection(com.sshtools.common.ssh.SshConnection connection)
      Set a single Connection to use.
      Parameters:
      connection - connection
      Returns:
      builder for chaining
    • withClients

      public B withClients(Function<Integer,SshClient> clientSupplier)
      Set a Function that supplies SshClient instances. The function is provided with an index, with the control client being index 0, and subsequent clients having index of 1 up to to whatever #withChunks(int) was given (or the default of 3).
      Parameters:
      clientSupplier - supplier of clients
      Returns:
      builder for chaining
    • build

      public abstract T build()