Package org.apache.ftpserver

Examples of org.apache.ftpserver.ConnectionConfigFactory


                        "Unknown configuration name: " + childName);
            }
        }

        // Configure login limits
        ConnectionConfigFactory connectionConfig = new ConnectionConfigFactory();
        if (StringUtils.hasText(element.getAttribute("max-logins"))) {
            connectionConfig.setMaxLogins(SpringUtil.parseInt(element,
                    "max-logins"));
        }
        if (StringUtils.hasText(element.getAttribute("max-threads"))) {
            connectionConfig.setMaxThreads(SpringUtil.parseInt(element,
                    "max-threads"));
        }
        if (StringUtils.hasText(element.getAttribute("max-anon-logins"))) {
            connectionConfig.setMaxAnonymousLogins(SpringUtil.parseInt(element,
                    "max-anon-logins"));
        }
        if (StringUtils.hasText(element.getAttribute("anon-enabled"))) {
            connectionConfig.setAnonymousLoginEnabled(SpringUtil.parseBoolean(
                    element, "anon-enabled", true));
        }
        if (StringUtils.hasText(element.getAttribute("max-login-failures"))) {
            connectionConfig.setMaxLoginFailures(SpringUtil.parseInt(element,
                    "max-login-failures"));
        }
        if (StringUtils.hasText(element.getAttribute("login-failure-delay"))) {
            connectionConfig.setLoginFailureDelay(SpringUtil.parseInt(element,
                    "login-failure-delay"));
        }

        factoryBuilder.addPropertyValue("connectionConfig", connectionConfig.createConnectionConfig());

      
        BeanDefinition factoryDefinition = factoryBuilder.getBeanDefinition();

        String factoryName = parserContext.getReaderContext().generateBeanName(factoryDefinition);
View Full Code Here


        return serverFactory;
    }

    protected ConnectionConfigFactory createConnectionConfigFactory() {
        return new ConnectionConfigFactory();
    }
View Full Code Here

     */
    @Override
    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        ConnectionConfigFactory ccFactory = new ConnectionConfigFactory();

        ccFactory.setAnonymousLoginEnabled(false);

        server.setConnectionConfig(ccFactory.createConnectionConfig());

        return server;
    }
View Full Code Here

    @Override
    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        ConnectionConfigFactory ccFactory = new ConnectionConfigFactory();

        ccFactory.setMaxLoginFailures(0);

        server.setConnectionConfig(ccFactory.createConnectionConfig());
        return server;
    }
View Full Code Here

        factory.setPort(BaseServerTestSupport.port);
       
        FtpServerFactory serverFactory = new FtpServerFactory();
        serverFactory.setUserManager(userMgr);
        serverFactory.setFileSystem(fsf);
        serverFactory.setConnectionConfig(new ConnectionConfigFactory().createConnectionConfig());
        serverFactory.addListener(DEFAULT_LISTENER, factory.createListener());

        return serverFactory;
    }
View Full Code Here

    private static final String UNKNOWN_PASSWORD = "bar";

    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        ConnectionConfigFactory ccFactory = new ConnectionConfigFactory();

        ccFactory.setMaxLoginFailures(2);

        server.setConnectionConfig(ccFactory.createConnectionConfig());
       
        return server;
    }
View Full Code Here

    private static final String UNKNOWN_PASSWORD = "bar";

    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        ConnectionConfigFactory ccFactory = new ConnectionConfigFactory();

        ccFactory.setMaxLoginFailures(0);

        server.setConnectionConfig(ccFactory.createConnectionConfig());
        return server;
    }
View Full Code Here

        client = null;
    }

    @Override
    protected ConnectionConfigFactory createConnectionConfigFactory() {
        ConnectionConfigFactory factory = super.createConnectionConfigFactory();
        factory.setMaxLogins(0);
        return factory;
    }
View Full Code Here

        return serverFactory;
    }

    protected ConnectionConfigFactory createConnectionConfigFactory() {
        return new ConnectionConfigFactory();
    }
View Full Code Here

     * @see org.apache.ftpserver.clienttests.ClientTestTemplate#createConfig()
     */
    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        ConnectionConfigFactory ccFactory = new ConnectionConfigFactory();

        ccFactory.setAnonymousLoginEnabled(false);

        server.setConnectionConfig(ccFactory.createConnectionConfig());

        return server;
    }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.ConnectionConfigFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.