Class FtpSession
java.lang.Object
org.frankframework.filesystem.ftp.FtpSession
- All Implemented Interfaces:
HasApplicationContext, IConfigurable, IScopeProvider, HasKeystore, HasTruststore
- Direct Known Subclasses:
FtpFileSystem
Base class for FTP(s) connections
- Author:
- John Dekker
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected static voidclose(org.apache.commons.net.ftp.FTPClient ftpClient) voidConfigure this component.org.apache.commons.net.ftp.FTPClientopenClient(String remoteDirectory) voidsetAuthAlias(String string) Name of the alias to obtain credentials to authenticatie on remote servervoidsetFileType(FtpSession.FileType value) voidsetFtpType(FtpSession.FtpType value) FTP protocol to usevoidName or ip address of remote hostvoidsetKeystoreConfiguration(KeystoreConfiguration keystoreConfiguration) Set theKeystoreConfigurationobjectvoidsetPassive(boolean b) Iftrue, passive ftp is used: before data is sent, a pasv command is issued, and the connection is set up by the servervoidsetPassword(String string) Password to authenticatie on remote servervoidsetPort(int i) Port number of remote hostvoidsetProt(FtpSession.Prot prot) Sets theData Channel Protection Level.voidsetProxyHost(String string) Proxy hostnamevoidsetProxyPort(int i) Proxy portvoid(ftps) Transport type in case of sftpvoidsetTruststoreConfiguration(TruststoreConfiguration truststoreConfiguration) voidsetUsername(String string) Name of the user to authenticatie on remote serverMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface HasKeystore
createKeystoreConfiguration, getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystoreConfiguration, getKeystorePassword, getKeystoreType, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreTypeMethods inherited from interface HasTruststore
createTruststoreConfiguration, getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststoreConfiguration, getTruststorePassword, getTruststoreType, isAllowSelfSignedCertificates, isIgnoreCertificateExpiredException, isVerifyHostname, setAllowSelfSignedCertificates, setIgnoreCertificateExpiredException, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setVerifyHostname
-
Constructor Details
-
FtpSession
public FtpSession()
-
-
Method Details
-
configure
Description copied from interface:IConfigurableConfigure 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:
configurein interfaceIConfigurable- Throws:
ConfigurationException- in case it was not able to configure the component.
-
openClient
public org.apache.commons.net.ftp.FTPClient openClient(String remoteDirectory) throws FileSystemException - Throws:
FileSystemException
-
close
protected static void close(org.apache.commons.net.ftp.FTPClient ftpClient) -
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
-
setFtpType
-
setFileType
-
setPassive
public void setPassive(boolean b) Iftrue, passive ftp is used: before data is sent, a pasv command is issued, and the connection is set up by the server- Default value
- true
-
setProxyTransportType
(ftps) Transport type in case of sftp- Default value
- SOCKS5
-
setProt
-
setKeystoreConfiguration
Description copied from interface:HasKeystoreSet theKeystoreConfigurationobject- Specified by:
setKeystoreConfigurationin interfaceHasKeystore
-
setTruststoreConfiguration
- Specified by:
setTruststoreConfigurationin interfaceHasTruststore
-