# 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:
  - vertx-shell-js/command_registry.js, line 35

### 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:
  - vertx-shell-js/command_registry.js, line 49

##### 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:
  - vertx-shell-js/command_registry.js, line 74

##### 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:
  - vertx-shell-js/command_registry.js, line 99

##### Returns:

a reference to this, so the API can be used fluently

Type
  CommandRegistry