Package com.tenio.core.command.system
Class AbstractSystemCommandHandler
java.lang.Object
com.tenio.common.logger.AbstractLogger
com.tenio.common.logger.SystemLogger
com.tenio.core.handler.AbstractHandler
com.tenio.core.command.system.AbstractSystemCommandHandler
- Direct Known Subclasses:
HelpCommand,InfoCommand,ServerCommand,UnBanAddressCommand
The base class for all self defined commands.
- Since:
- 0.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidIt is called when the server invokes a command.Retrieves the system command manager.Retrieves the command description.getLabel()Retrieves the command label.String[]getUsage()Retrieves the command usage (manual).booleanChecks whether the command should be running in background.voidsetCommandManager(SystemCommandManager systemCommandManager) Sets a value for system command manager.toString()Methods inherited from class com.tenio.core.handler.AbstractHandler
api, array, clientCommand, map, msgarray, msgmap, response, roomSettingMethods inherited from class com.tenio.common.logger.SystemLogger
debug, debugEvent, isDebugEnabled, isTraceEnabled, trace, traceMethods inherited from class com.tenio.common.logger.AbstractLogger
buildgen, error, error, error, info, info, info, info, info, info, info, info, isErrorEnabled, isInfoEnabled
-
Constructor Details
-
AbstractSystemCommandHandler
public AbstractSystemCommandHandler()
-
-
Method Details
-
getLabel
Retrieves the command label.- Returns:
- a
Stringvalue of the command label
-
getUsage
Retrieves the command usage (manual).- Returns:
- an array of instructions in
Stringvalues
-
getDescription
Retrieves the command description.- Returns:
- a
Stringvalue of the command description
-
isRunningBackground
public boolean isRunningBackground()Checks whether the command should be running in background.- Returns:
trueif the command should be running in the background, otherwise, returnsfalse
-
getCommandManager
Retrieves the system command manager.- Returns:
- an instance of
SystemCommandManager
-
setCommandManager
Sets a value for system command manager.- Parameters:
systemCommandManager- an instance ofSystemCommandManager
-
execute
It is called when the server invokes a command.- Parameters:
args- The arguments to the command
-
toString
-