Class FtpSession

java.lang.Object
org.frankframework.filesystem.ftp.FtpSession
All Implemented Interfaces:
HasApplicationContext, IConfigurable, IScopeProvider, HasKeystore, HasTruststore
Direct Known Subclasses:
FtpFileSystem

public class FtpSession extends Object implements IConfigurable, HasKeystore, HasTruststore
Base class for FTP(s) connections
Author:
John Dekker
  • Constructor Details

    • FtpSession

      public FtpSession()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      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 this IConfigurable. 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 the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      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

      public void setHost(String string)
      Name or ip address of remote host
    • setPort

      public void setPort(int i)
      Port number of remote host
      Default value
      21
    • setAuthAlias

      public void setAuthAlias(String string)
      Name of the alias to obtain credentials to authenticatie on remote server
    • setUsername

      public void setUsername(String string)
      Name of the user to authenticatie on remote server
    • setPassword

      public void setPassword(String string)
      Password to authenticatie on remote server
    • setProxyHost

      public void setProxyHost(String string)
      Proxy hostname
    • setProxyPort

      public void setProxyPort(int i)
      Proxy port
      Default value
      1080
    • setFtpType

      public void setFtpType(FtpSession.FtpType value)
      FTP protocol to use
      Default value
      FTP
    • setFileType

      public void setFileType(FtpSession.FileType value)
    • setPassive

      public void setPassive(boolean b)
      If true, 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

      public void setProxyTransportType(FtpSession.TransportType type)
      (ftps) Transport type in case of sftp
      Default value
      SOCKS5
    • setProt

      public void setProt(FtpSession.Prot prot)
      Sets the Data Channel Protection Level.
      Default value
      C
    • setKeystoreConfiguration

      public void setKeystoreConfiguration(KeystoreConfiguration keystoreConfiguration)
      Description copied from interface: HasKeystore
      Set the KeystoreConfiguration object
      Specified by:
      setKeystoreConfiguration in interface HasKeystore
    • setTruststoreConfiguration

      public void setTruststoreConfiguration(TruststoreConfiguration truststoreConfiguration)
      Specified by:
      setTruststoreConfiguration in interface HasTruststore