You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Volkan İSTEK <Vo...@provus.com.tr> on 2010/03/22 13:25:26 UTC

Custom command extension

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



Re: Custom command extension

Posted by David Latorre <dv...@gmail.com>.
I'm glad you find Apache FTP Server useful for your company. If there
are any missing features you'd like to see in FTPServer don't
hesitante in opening a JIRA issue (and provide a patch!


David Latorre


2010/3/22 Volkan İSTEK <Vo...@provus.com.tr>:
> I tested it's work. We have a ftp server. It^s implemented in house on TCP / IP server. We use custom commands for executing program, using bundle job etc. Apache FTP Server has talended feature like resume file transfer, customizable user managment, simple handling connection timeouts. So we decide to replace ours by yours.
>
> 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
>
>
> -----Original Message-----
> From: Sai Pullabhotla [mailto:sai.pullabhotla@jmethods.com]
> Sent: Monday, March 22, 2010 3:18 PM
> To: ftpserver-users@mina.apache.org
> Subject: Re: Custom command extension
>
> Yes, that should work.
>
> Regards,
> Sai Pullabhotla
>
>
>
>
>
> 2010/3/22 Volkan İSTEK <Vo...@provus.com.tr>:
>> 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
>>
>>
>>
>

RE: Custom command extension

Posted by Volkan İSTEK <Vo...@provus.com.tr>.
I tested it's work. We have a ftp server. It^s implemented in house on TCP / IP server. We use custom commands for executing program, using bundle job etc. Apache FTP Server has talended feature like resume file transfer, customizable user managment, simple handling connection timeouts. So we decide to replace ours by yours. 
 
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
 

-----Original Message-----
From: Sai Pullabhotla [mailto:sai.pullabhotla@jmethods.com] 
Sent: Monday, March 22, 2010 3:18 PM
To: ftpserver-users@mina.apache.org
Subject: Re: Custom command extension

Yes, that should work.

Regards,
Sai Pullabhotla





2010/3/22 Volkan İSTEK <Vo...@provus.com.tr>:
> 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
>
>
>

Re: Custom command extension

Posted by Sai Pullabhotla <sa...@jmethods.com>.
Yes, that should work.

Regards,
Sai Pullabhotla





2010/3/22 Volkan İSTEK <Vo...@provus.com.tr>:
> 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
>
>
>