Hi every body

I'm a new user of Apache FtpServer. I want to add custom command. Author say on 
the features page "All the FTP messages are customizable." but did not talk 
about new custom command. I could simply add a command using below code:

            CommandFactoryFactory  cf = new CommandFactoryFactory();
            cf.addCommand("NEW_CUSTOM_COMMAND", new NewCustomCommand());
            CommandFactory commandFactory = cf.createCommandFactory();
            FtpServerFactory serverFactory = new FtpServerFactory();
            serverFactory.setCommandFactory(commandFactory);

            public class NewCustomCommand implements Command{

                  public void execute(FtpIoSession session, FtpServerContext 
context,
                              FtpRequest request) throws IOException, 
FtpException {
                        // main code
                  }
            }

Are there any other advised methot for this reason. Thanks a lot.

Volkan İstek
PROVUS Bilişim Hizmetleri A.Ş.
Maslak Yolu No:5 Ayazağa Mah.
80670 Şişli /İSTANBUL
Tel   : 90 212 329 06 46
Fax : 90 212 329 06 99


Reply via email to