// FtpServer from our own custom FtpServerContext
this.configuration = new SlingConfiguration(config);
UserManager userManager = new SlingUserManager(this.rrFactory, this.configuration);
final ListenerFactory listenerFactory = new ListenerFactory();
listenerFactory.setPort(this.configuration.getPort());
final SlingFtpletProxy wcPlugin = new SlingFtpletProxy();
final FtpServerFactory factory = new FtpServerFactory();
factory.setFileSystem(new SlingFileSystemFactory());
factory.setUserManager(userManager);
factory.setConnectionConfig(this.configuration);
factory.addListener("default", listenerFactory.createListener());
factory.setFtplets(new HashMap<String, Ftplet>() {
{
put("sling", wcPlugin);
}
});