All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sirius.biz.storage.vfs.ftp.ConfigBasedConnectionConfig Maven / Gradle / Ivy

There is a newer version: 9.6
Show newest version
/*
 * Made with all the love in the world
 * by scireum in Remshalden, Germany
 *
 * Copyright by scireum GmbH
 * http://www.scireum.de - [email protected]
 */

package sirius.biz.storage.vfs.ftp;

import org.apache.ftpserver.ConnectionConfig;
import sirius.kernel.di.std.ConfigValue;

/**
 * Provides a FTP config based on the system configuration.
 */
class ConfigBasedConnectionConfig implements ConnectionConfig {

    @ConfigValue("storage.ftp.maxLoginFailures")
    private static int maxLoginFailures;

    @ConfigValue("storage.ftp.maxClients")
    private static int maxClients;

    @ConfigValue("storage.ftp.maxThreads")
    private static int maxThreads;

    @Override
    public int getLoginFailureDelay() {
        return 1;
    }

    @Override
    public int getMaxAnonymousLogins() {
        return 0;
    }

    @Override
    public int getMaxLoginFailures() {
        return maxLoginFailures;
    }

    @Override
    public int getMaxLogins() {
        return maxClients;
    }

    @Override
    public boolean isAnonymousLoginEnabled() {
        return false;
    }

    @Override
    public int getMaxThreads() {
        return maxThreads;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy