Class: CommandRegistry

vertx-shell-js/command_registry~ CommandRegistry

new CommandRegistry()

A registry that contains the commands known by a shell.

It is a mutable command resolver.

Source:

Methods

registerCommand(command, completionHandler) → {CommandRegistry}

Register a command
Parameters:
Name Type Description
command Command the command to register
completionHandler function notified when the command is registered
Source:
Returns:
a reference to this, so the API can be used fluently
Type
CommandRegistry

registerCommands(commands, completionHandler) → {CommandRegistry}

Register a list of commands.
Parameters:
Name Type Description
commands Array.<Command> the commands to register
completionHandler function notified when the command is registered
Source:
Returns:
a reference to this, so the API can be used fluently
Type
CommandRegistry

unregisterCommand(commandName, completionHandler) → {CommandRegistry}

Unregister a command.
Parameters:
Name Type Description
commandName string the command name
completionHandler function notified when the command is unregistered
Source:
Returns:
a reference to this, so the API can be used fluently
Type
CommandRegistry