Class CommandFactory.UserCommandInfo
Object
UserCommandInfo
- Enclosing class:
CommandFactory
The definition of a user command. Bear in mind that commands that are
executed often do not make very good global user commands, as the load on
the database might be a little too much.
- Author:
- maartenl
-
Constructor Summary
ConstructorsConstructorDescriptionUserCommandInfo
(int aCommandId, String aCommand, String aMethodName) constructor for creating a user command for all rooms.UserCommandInfo
(int aCommandId, String aCommand, String aMethodName, Long aRoom) constructor for creating a user command for a specific room. -
Method Summary
-
Constructor Details
-
UserCommandInfo
constructor for creating a user command for a specific room.- Parameters:
aCommandId
- the identification number for the commandaCommand
- the regular expression for determining the command is equal to the command entered.aMethodName
- the name of the method to call.aRoom
- the room in which this command is active. Can be a null pointer if the command is active in all rooms.
-
UserCommandInfo
constructor for creating a user command for all rooms.- Parameters:
aCommandId
- the identification number for the commandaCommand
- the regular expression for determining the command is equal to the command entered.aMethodName
- the name of the method to call.
-
-
Method Details
-
getCommand
-
getCommandId
public int getCommandId() -
getMethodName
-
getRoom
-
equals
-
getTheCommandId
public int getTheCommandId() -
toString
-
deactivateCommand
Use this method when the command that had to be run, throws an exception.- Throws:
MudException
-