public final class SftpSessionBuilder extends Object
Instances of this class are not safe for use by multiple threads.
| Constructor and Description |
|---|
SftpSessionBuilder(String hostName,
int port,
String userName)
Create a builder.
|
SftpSessionBuilder(String hostName,
String userName)
Create a builder with a default port value.
|
| Modifier and Type | Method and Description |
|---|---|
SftpSession |
build()
Create a SFTP session from the gathered parameters.
|
SftpSessionBuilder |
setPassphrase(String passphrase)
Set the private key pass-phrase.
|
SftpSessionBuilder |
setPassword(String password)
Set the user password.
|
SftpSessionBuilder |
setPrivateKeyFilePath(String privateKeyFilePath)
Set the path to the private key file.
|
public SftpSessionBuilder(String hostName, String userName)
hostName - The host nameuserName - The user namepublic final SftpSessionBuilder setPassword(String password)
password - The user passwordpublic final SftpSessionBuilder setPrivateKeyFilePath(String privateKeyFilePath)
privateKeyFilePath - The path to the private key filepublic final SftpSessionBuilder setPassphrase(String passphrase)
passphrase - The private key pass-phrasepublic final SftpSession build()
Copyright © 2019. All rights reserved.