1 18 package net.sf.drftpd.master.command.plugins; 19 20 import net.sf.drftpd.master.BaseFtpConnection; 21 import net.sf.drftpd.master.FtpReply; 22 import net.sf.drftpd.master.command.CommandManager; 23 import net.sf.drftpd.master.command.CommandManagerFactory; 24 25 import org.drftpd.commands.CommandHandler; 26 import org.drftpd.commands.CommandHandlerFactory; 27 import org.drftpd.commands.UnhandledCommandException; 28 29 35 public class Dummy implements CommandHandlerFactory { 36 37 static class DummyHandler implements CommandHandler { 38 private CommandManager _cmdmgr; 39 40 43 public DummyHandler(CommandManager initializer) { 44 _cmdmgr = initializer; 45 } 46 47 public FtpReply execute(BaseFtpConnection conn) 48 throws UnhandledCommandException { 49 return FtpReply.RESPONSE_200_COMMAND_OK; 50 } 51 52 public String [] getFeatReplies() { 53 return (String []) _cmdmgr.getHandledCommands(getClass()).toArray( 54 new String [0]); 55 } 56 } 57 58 public Dummy() { 59 super(); 60 } 61 public CommandHandler initialize( 62 BaseFtpConnection conn, 63 CommandManager initializer) { 64 return new DummyHandler(initializer); 66 } 67 public void load(CommandManagerFactory initializer) { 68 } 69 public void unload() { 70 } 71 } 72 | Popular Tags |