io.vertx.ext.shell.command

## Interface CommandRegistry

- All Superinterfaces:
    CommandResolver

      public interface CommandRegistry
      extends CommandResolver

  A registry that contains the commands known by a shell.

  It is a mutable command resolver.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CommandRegistry` | `create(Vertx vertx)` Create a new registry.
    `static CommandRegistry` | `getShared(Vertx vertx)` Get the shared registry for the Vert.x instance.
    `CommandRegistry` | `registerCommand(Class<? extends AnnotatedCommand> command)` Like `registerCommand(Class, Handler)`, without a completion handler.
    `CommandRegistry` | `registerCommand(Class<? extends AnnotatedCommand> command, Handler<AsyncResult<Command>> completionHandler)` Register a single command.
    `CommandRegistry` | `registerCommand(Command command)` Like `registerCommand(Command, Handler)`, without a completion handler.
    `CommandRegistry` | `registerCommand(Command command, Handler<AsyncResult<Command>> completionHandler)` Register a command
    `CommandRegistry` | `registerCommands(List<Command> commands)` Like `registerCommands(List, Handler)`, without a completion handler.
    `CommandRegistry` | `registerCommands(List<Command> commands, Handler<AsyncResult<List<Command>>> completionHandler)` Register a list of commands.
    `CommandRegistry` | `unregisterCommand(String commandName)` Like `unregisterCommand(String, Handler)`, without a completion handler.
    `CommandRegistry` | `unregisterCommand(String commandName, Handler<AsyncResult<Void>> completionHandler)` Unregister a command.

    - ### Methods inherited from interface io.vertx.ext.shell.command.CommandResolver

      `baseCommands, commands, getCommand`

- - ### Method Detail

    - #### getShared

          static CommandRegistry getShared(Vertx vertx)

      Get the shared registry for the Vert.x instance.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        the shared registry

    - #### create

          static CommandRegistry create(Vertx vertx)

      Create a new registry.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        the created registry

    - #### registerCommand

          CommandRegistry registerCommand(Class<? extends AnnotatedCommand> command)

      Like `registerCommand(Class, Handler)`, without a completion handler.

    - #### registerCommand

          CommandRegistry registerCommand(Class<? extends AnnotatedCommand> command,
                                          Handler<AsyncResult<Command>> completionHandler)

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

    - #### registerCommand

          CommandRegistry registerCommand(Command command)

      Like `registerCommand(Command, Handler)`, without a completion handler.

    - #### registerCommand

          CommandRegistry registerCommand(Command command,
                                          Handler<AsyncResult<Command>> completionHandler)

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

    - #### registerCommands

          CommandRegistry registerCommands(List<Command> commands)

      Like `registerCommands(List, Handler)`, without a completion handler.

    - #### registerCommands

          CommandRegistry registerCommands(List<Command> commands,
                                           Handler<AsyncResult<List<Command>>> completionHandler)

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

    - #### unregisterCommand

          CommandRegistry unregisterCommand(String commandName)

      Like `unregisterCommand(String, Handler)`, without a completion handler.

    - #### unregisterCommand

          CommandRegistry unregisterCommand(String commandName,
                                            Handler<AsyncResult<Void>> completionHandler)

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

Copyright © 2019 Eclipse. All rights reserved.