|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jetrix.commands.CommandManager
public class CommandManager
CommandManager
Method Summary | |
---|---|
void |
addCommand(Command command)
Register a new command. |
void |
addCommandAlias(Command command,
String alias)
Register a new alias for a command. |
void |
clear()
Clear all commands. |
void |
execute(CommandMessage m)
Execute the command specified in the message. |
void |
execute(CommandMessage m,
Command command)
Execute an unregistered command. |
Command |
getCommand(String alias)
Return the command matching the specified alias. |
Iterator<Command> |
getCommands()
Return all commands available to clients with the lowest access level. |
Iterator<Command> |
getCommands(int accessLevel)
Return all commands available to clients with the specified access level. |
static CommandManager |
getInstance()
|
void |
removeCommand(Command command)
Remove a command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CommandManager getInstance()
public void addCommand(Command command)
public void addCommandAlias(Command command, String alias)
public void removeCommand(Command command)
public Command getCommand(String alias)
public Iterator<Command> getCommands()
public Iterator<Command> getCommands(int accessLevel)
public void execute(CommandMessage m)
public void execute(CommandMessage m, Command command)
public void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |