com.cometway.util
Interface ICommandParser

All Known Implementing Classes:
ESMTPReceiver, ReceiveEmailHandler

public interface ICommandParser

classes that might provide a command string parse method implement ICommandParser


Method Summary
 void addCommandParser(java.lang.String command, ICommandParser parser)
          addCommandParser adds an ICommandParser to extend the commands that it can parse by adding ICommandParsers for new commands.
 java.lang.String parseCommand(java.lang.String command)
          parse: method parses a command represented as a String of tokens, returning a String response.
 

Method Detail

parseCommand

java.lang.String parseCommand(java.lang.String command)
parse: method parses a command represented as a String of tokens, returning a String response. the response might be used to indicate success or failure of different sorts, or state as a result of command


addCommandParser

void addCommandParser(java.lang.String command,
                      ICommandParser parser)
addCommandParser adds an ICommandParser to extend the commands that it can parse by adding ICommandParsers for new commands. the String represents the new command to be parsed by the given ICommandParser