Package: io.vertx.groovy.ext.shell.command

## [Groovy] Class CommandRegistry

- io.vertx.groovy.ext.shell.command.CommandRegistry

- A registry that contains the commands known by a shell.

  It is a mutable command resolver.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `CommandRegistry (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static CommandRegistry` | `create(Vertx vertx)` Create a new registry.
    `java.lang.Object` | `getDelegate()`
    `static CommandRegistry` | `getShared(Vertx vertx)` Get the shared registry for the Vert.x instance.
    `CommandRegistry` | `registerCommand(Command command)` Like CommandRegistry.registerCommand, without a completion handler.
    `CommandRegistry` | `registerCommand(Command command, io.vertx.core.Handler<io.vertx.core.AsyncResult<Command>> completionHandler)` Register a command
    `CommandRegistry` | `registerCommands(java.util.List<Command> commands)` Like CommandRegistry.registerCommands, without a completion handler.
    `CommandRegistry` | `registerCommands(java.util.List<Command> commands, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Command>>> completionHandler)` Register a list of commands.
    `CommandRegistry` | `unregisterCommand(java.lang.String commandName)` Like CommandRegistry.unregisterCommand, without a completion handler.
    `CommandRegistry` | `unregisterCommand(java.lang.String commandName, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler)` Unregister a command.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class CommandResolver` | `baseCommands, commands, getCommand, getDelegate`

- - ### Constructor Detail

    - #### CommandRegistry(java.lang.Object delegate)

  - ### Method Detail

    - #### static CommandRegistry create(Vertx vertx)

      Create a new registry.

      Returns:
        the created registry
      Parameters:
        `vertx` - the vertx instance

    - #### java.lang.Object getDelegate()

    - #### static CommandRegistry getShared(Vertx vertx)

      Get the shared registry for the Vert.x instance.

      Returns:
        the shared registry
      Parameters:
        `vertx` - the vertx instance

    - #### CommandRegistry registerCommand(Command command)

      Like CommandRegistry.registerCommand, without a completion handler.

      Returns:
      Parameters:
        command

    - #### CommandRegistry registerCommand(Command command, io.vertx.core.Handler<io.vertx.core.AsyncResult<Command>> completionHandler)

      Register a command

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `command` - the command to register
        `completionHandler` - notified when the command is registered

    - #### CommandRegistry registerCommands(java.util.List<Command> commands)

      Like CommandRegistry.registerCommands, without a completion handler.

      Returns:
      Parameters:
        commands

    - #### CommandRegistry registerCommands(java.util.List<Command> commands, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Command>>> completionHandler)

      Register a list of commands.

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `commands` - the commands to register
        `completionHandler` - notified when the command is registered

    - #### CommandRegistry unregisterCommand(java.lang.String commandName)

      Like CommandRegistry.unregisterCommand, without a completion handler.

      Returns:
      Parameters:
        commandName

    - #### CommandRegistry unregisterCommand(java.lang.String commandName, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler)

      Unregister a command.

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `commandName` - the command name
        `completionHandler` - notified when the command is unregistered