Class SftpSession
java.lang.Object
org.frankframework.filesystem.sftp.SftpSession
- All Implemented Interfaces:
IConfigurable
- Direct Known Subclasses:
SftpFileSystem
Helper class for sftp.
- Author:
- Niels Meijer
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static void
close
(com.jcraft.jsch.ChannelSftp sftpClient) void
Configure this component.protected boolean
com.jcraft.jsch.ChannelSftp
openClient
(String remoteDirectory) void
setAuthAlias
(String string) Name of the alias to obtain credentials to authenticatie on remote servervoid
Name or ip address of remote hostvoid
setKnownHostsPath
(String string) Path to file with knownhostsvoid
setPassword
(String string) Password to authenticatie on remote servervoid
setPort
(int i) Port number of remote hostvoid
setPrefCSEncryption
(String string) Optional preferred encryption from client to server for sftp protocolvoid
setPrefSCEncryption
(String string) Optional preferred encryption from server to client for sftp protocolvoid
setPrivateKeyAuthAlias
(String string) Name of the alias to obtain credentials for passphrase of private key filevoid
setPrivateKeyFilePath
(String string) Path to private key file for sftp authenticationvoid
setPrivateKeyPassword
(String password) Passphrase of private key filevoid
setProxyAuthAlias
(String string) alias to obtain credentials to authenticate on proxyvoid
setProxyHost
(String string) Proxy hostnamevoid
setProxyPassword
(String string) Default password in case proxy requires authenticationvoid
setProxyPort
(int i) Proxy portvoid
Transport type in case of sftpvoid
setProxyUsername
(String string) Default user name in case proxy requires authenticationvoid
setStrictHostKeyChecking
(boolean b) Verify the hosts againt the knownhosts file.void
setUsername
(String string) Name of the user to authenticatie on remote server
-
Constructor Details
-
SftpSession
public SftpSession()
-
-
Method Details
-
configure
Description copied from interface:IConfigurable
Configure this component.configure()
is called once at startup of the framework in the configure method of the owner of thisIConfigurable
. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure()
, to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
openClient
- Throws:
FileSystemException
-
isSessionStillWorking
protected boolean isSessionStillWorking() -
close
public static void close(com.jcraft.jsch.ChannelSftp sftpClient) -
close
public void close() -
setHost
Name or ip address of remote host -
setPort
public void setPort(int i) Port number of remote host- Default value
- 21
-
setAuthAlias
Name of the alias to obtain credentials to authenticatie on remote server -
setUsername
Name of the user to authenticatie on remote server -
setPassword
Password to authenticatie on remote server -
setProxyHost
Proxy hostname -
setProxyPort
public void setProxyPort(int i) Proxy port- Default value
- 1080
-
setProxyAuthAlias
alias to obtain credentials to authenticate on proxy -
setProxyUsername
Default user name in case proxy requires authentication -
setProxyPassword
Default password in case proxy requires authentication -
setProxyTransportType
Transport type in case of sftp- Default value
- SOCKS5
-
setPrefCSEncryption
Optional preferred encryption from client to server for sftp protocol -
setPrefSCEncryption
Optional preferred encryption from server to client for sftp protocol -
setPrivateKeyFilePath
Path to private key file for sftp authentication -
setPrivateKeyAuthAlias
Name of the alias to obtain credentials for passphrase of private key file -
setPrivateKeyPassword
Passphrase of private key file -
setKnownHostsPath
Path to file with knownhosts -
setStrictHostKeyChecking
public void setStrictHostKeyChecking(boolean b) Verify the hosts againt the knownhosts file.- Default value
- true
-