Package org.wildfly.security.credential
Class SSHCredential.Builder
- java.lang.Object
-
- org.wildfly.security.credential.SSHCredential.Builder
-
- Enclosing class:
- SSHCredential
public static class SSHCredential.Builder extends Object
A builder for SSHCredential.
-
-
Field Summary
Fields Modifier and Type Field Description private String
knownHostsFile
private Credential
passphrase
private String[]
privateKeyIdentities
private File
sshDirectory
-
Constructor Summary
Constructors Constructor Description Builder()
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSHCredential
build()
Build a new instance of SSHCredential.SSHCredential.Builder
setKnownHostsFile(String knownHostsFile)
The name of the file containing the known hosts fileSSHCredential.Builder
setPassphrase(Credential passphrase)
The passphrase needed to decrypt the private keySSHCredential.Builder
setPrivateKeyIdentities(String[] privateKeyIdentities)
An array of the names of files containing private keysSSHCredential.Builder
setPrivateKeyIdentity(String privateKeyIdentity)
The name of the file containing the private keySSHCredential.Builder
setSSHDirectory(File sshDirectory)
The path to the ssh directory containing the private key file and known hosts fileSSHCredential.Builder
setSSHDirectory(String sshDirectory)
The path to the ssh directory containing the private key file and known hosts file
-
-
-
Field Detail
-
sshDirectory
private File sshDirectory
-
privateKeyIdentities
private String[] privateKeyIdentities
-
passphrase
private Credential passphrase
-
knownHostsFile
private String knownHostsFile
-
-
Method Detail
-
setSSHDirectory
public SSHCredential.Builder setSSHDirectory(String sshDirectory)
The path to the ssh directory containing the private key file and known hosts file- Parameters:
sshDirectory
- the ssh directory- Returns:
- this builder instance
-
setSSHDirectory
public SSHCredential.Builder setSSHDirectory(File sshDirectory)
The path to the ssh directory containing the private key file and known hosts file- Parameters:
sshDirectory
- the ssh directory- Returns:
- this builder instance
-
setPrivateKeyIdentity
public SSHCredential.Builder setPrivateKeyIdentity(String privateKeyIdentity)
The name of the file containing the private key- Parameters:
privateKeyIdentity
- the name of the private key file- Returns:
- this builder instance
-
setPrivateKeyIdentities
public SSHCredential.Builder setPrivateKeyIdentities(String[] privateKeyIdentities)
An array of the names of files containing private keys- Parameters:
privateKeyIdentities
- the names of the private key files- Returns:
- this builder instance
-
setPassphrase
public SSHCredential.Builder setPassphrase(Credential passphrase)
The passphrase needed to decrypt the private key- Parameters:
passphrase
- the passphrase used to decrypt the private key- Returns:
- this builder instance
-
setKnownHostsFile
public SSHCredential.Builder setKnownHostsFile(String knownHostsFile)
The name of the file containing the known hosts file- Parameters:
knownHostsFile
- the name of the file containing the known SSH hosts- Returns:
- this builder instance
-
build
public SSHCredential build()
Build a new instance of SSHCredential.- Returns:
- a new SSHCredential instance
-
-