Package com.tenio.core.command.system
Class SystemCommandManager
java.lang.Object
com.tenio.common.logger.AbstractLogger
com.tenio.common.logger.SystemLogger
com.tenio.core.command.system.SystemCommandManager
The commands' management class.
- Since:
- 0.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all settings.Retrieves the annotations map.Retrieves the annotations list.getHandler(String label) Returns a handler by its labelRetrieves all handlers.Returns a list of all registered commands.voidInvokes a command handler with given arguments.voidregisterCommand(String label, AbstractSystemCommandHandler command) Registers a command handler.voidunregisterCommand(String label) Removes a registered command handler.Methods 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
-
SystemCommandManager
public SystemCommandManager()
-
-
Method Details
-
registerCommand
Registers a command handler.- Parameters:
label- The command labelcommand- The command handler
-
unregisterCommand
Removes a registered command handler.- Parameters:
label- The command label
-
getAnnotationsAsList
Retrieves the annotations list.- Returns:
- a
Listof annotations - See Also:
-
getAnnotations
Retrieves the annotations map.- Returns:
- a
Mapof annotations - See Also:
-
getHandlersAsList
Returns a list of all registered commands.- Returns:
- all command handlers as a list
-
getHandlers
Retrieves all handlers.- Returns:
- a
Mapof all handlers which are managed
-
getHandler
Returns a handler by its label- Parameters:
label- The command label- Returns:
- the command handler
-
invoke
Invokes a command handler with given arguments.- Parameters:
rawMessage- The messaged used to invoke the command
-
clear
public void clear()Clear all settings.
-