Hi

I'm working on making some of our core classes behave better with
concurrency. As part of that, NioLister should no longer be created
directly (using it's constructor) but rather using the new
ListenerFactory class. All setters that was previously available on
NioListener are now moved to ListenerFactory. By calling
createListener(), a new listener is created using the setup provided
to the factory. The listener itself can after that no longer be
changed (besides it running state). Here's an example:

        ListenerFactory factory = new ListenerFactory();

        // set the port of the listener
        factory.setPort(2221);

        // define SSL configuration
        DefaultSslConfiguration ssl = new DefaultSslConfiguration();
        ssl.setKeystoreFile(new File("src/test/resources/ftpserver.jks"));
        ssl.setKeystorePassword("password");

        // set the SSL configuration for the listener
        factory.setSslConfiguration(ssl);
        factory.setImplicitSsl(true);

        // replace the default listener
        server.addListener("default", factory.createListener());

/niklas

Reply via email to