Class RepositoryFtpServer

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

    @Component
    public class RepositoryFtpServer
    extends Object
    implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    The Class RepositoryFtpServer.
    • Constructor Detail

      • RepositoryFtpServer

        public RepositoryFtpServer()
    • Method Detail

      • setExternalAddress

        public void setExternalAddress​(String externalAddress)
        Set external address of the FTP server that will be returned to clients on the PASV command.
        Parameters:
        externalAddress - the new external address
        See Also:
        DataConnectionConfigurationFactory.setPassiveExternalAddress(String)
      • setPassivePorts

        public void setPassivePorts​(String passivePorts)
        Set the passive ports to be used for data connections.
        Parameters:
        passivePorts - the new passive ports
        See Also:
        DataConnectionConfigurationFactory.setPassivePorts(String)
      • setKeystorePath

        public void setKeystorePath​(String keystorePath)
        Set the path to Java keystore
         keytool -genkey -alias testdomain -keyalg RSA -keystore ftpserver.jks -keysize 4096
         
        Parameters:
        keystorePath - the new keystore path
      • setKeystorePsw

        public void setKeystorePsw​(String keystorePsw)
        Sets the keystore psw.
        Parameters:
        keystorePsw - the new keystore psw
      • setUserManager

        public void setUserManager​(org.apache.ftpserver.ftplet.UserManager userManager)
        Sets the user manager.
        Parameters:
        userManager - the new user manager
      • setMessageResource

        public void setMessageResource​(org.apache.ftpserver.message.MessageResource messageResource)
        Sets the message resource.
        Parameters:
        messageResource - the new message resource
      • setFtpPort

        public void setFtpPort​(int ftpPort)
        Sets the ftp port.
        Parameters:
        ftpPort - the new ftp port
      • setMaxLogins

        public void setMaxLogins​(int maxLogins)
        Sets the max logins.
        Parameters:
        maxLogins - the new max logins
      • setIdleTimeout

        public void setIdleTimeout​(int idleTimeout)
        Sets the idle timeout.
        Parameters:
        idleTimeout - the new idle timeout
      • setMaxThreads

        public void setMaxThreads​(int maxThreads)
        Sets the max threads.
        Parameters:
        maxThreads - the new max threads
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws org.apache.ftpserver.ftplet.FtpException,
                                       UnknownHostException
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        org.apache.ftpserver.ftplet.FtpException
        UnknownHostException
      • destroy

        public void destroy()
                     throws Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        Exception