I am proposing the inclusion of a CommandMap, which we can use in our
Handlers. A prototypical use of the command map would look like:
// initialize the command map
commands = new CommandMap(new CommandMap.Command()
{
public do(String command, String argument, String argument1)
{ // implementation of default command
}
});
commands.add(<command>, new CommandMap.Command()
{
public do(String command, String argument, String argument1)
{ // implementation of <command>
}
});
e.g.,
commands.add("USER", new CommandMap.Command()
{
});
commands.add("PASS", new CommandMap.Command()
{
});
Later, when we have a command, it is invoked as:
commands.do(command, argument, argument1);
This would simplify code, potentially speed up code, modularize the code,
improve readability, and allow us to add additional things to the
CommandMap.Command class such as stats, per command log strings, etc.
Comments?
--- Noel
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>