Package com.sshtools.client.tasks
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract T
build()
withClient
(SshClient client) Set a singleSshClient
to use.withClients
(Function<Integer, SshClient> clientSupplier) withConnection
(com.sshtools.common.ssh.SshConnection connection) Set a singleConnection
to use.
-
Field Details
-
clientSupplier
-
connection
-
-
Constructor Details
-
AbstractConnectionTaskBuilder
public AbstractConnectionTaskBuilder()
-
-
Method Details
-
withClient
Set a singleSshClient
to use.- Parameters:
client
- client- Returns:
- builder for chaining
-
withConnection
Set a singleConnection
to use.- Parameters:
connection
- connection- Returns:
- builder for chaining
-
withClients
Set aFunction
that suppliesSshClient
instances. The function is provided with anindex
, with the control client being index0
, and subsequent clients having index of1
up to to whatever#withChunks(int)
was given (or the default of3
).- Parameters:
clientSupplier
- supplier of clients- Returns:
- builder for chaining
-
build
-