KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > coldcore > coloradoftp > command > CommandFactory


1 package com.coldcore.coloradoftp.command;
2
3 import java.util.Set JavaDoc;
4
5 /**
6  * Commands factory (creates all available commands).
7  *
8  * Creates a command based on supplied user input. If a command cannot be created it must
9  * be substituted with one of the system commands carrying a proper error message.
10  *
11  * Control connection relies on this class to get a command object for submitted user input,
12  * it then feeds a freshly created command to a command processor for further execution.
13  *
14  *
15  * ColoradoFTP - The Open Source FTP Server (http://cftp.coldcore.com)
16  */

17 public interface CommandFactory {
18
19   /** List all available command names
20    * @return Names of commands (copy of the original set)
21    */

22   public Set JavaDoc<String JavaDoc> listNames();
23
24
25   /** Create command object
26    * @param input User input
27    * @return Command or command with failed message (never NULL)
28    */

29   public Command create(String JavaDoc input);
30 }
31
Popular Tags