io.vertx.ext.shell.registry

## Interface CommandRegistry

-     public interface CommandRegistry

  A registry that contains the commands known by a shell.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `complete(Completion completion)` Perform completion, the completion argument will be notified of the completion progress.
    `void` | `createProcess(List<CliToken> line, Handler<AsyncResult<Process>> handler)` Try to create a process from the command line tokens.
    `void` | `createProcess(String line, Handler<AsyncResult<Process>> handler)` Parses a command line and try to create a process.
    `static CommandRegistry` | `get(Vertx vertx)` Get the registry for the Vert.x instance
    `void` | `registerCommand(Class<? extends Command> command)` Register a command
    `void` | `registerCommand(Class<? extends Command> command, Handler<AsyncResult<CommandRegistration>> doneHandler)`
    `void` | `registerCommand(Command command)` Register a command
    `void` | `registerCommand(Command command, Handler<AsyncResult<CommandRegistration>> doneHandler)`
    `List<CommandRegistration>` | `registrations()`
    `void` | `unregisterCommand(String commandName)` Unregister a command.
    `void` | `unregisterCommand(String commandName, Handler<AsyncResult<Void>> doneHandler)`

- - ### Method Detail

    - #### get

          static CommandRegistry get(Vertx vertx)

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

    - #### registrations

          List<CommandRegistration> registrations()

      Returns:
        the current command registrations

    - #### createProcess

          void createProcess(String line,
                             Handler<AsyncResult<Process>> handler)

      Parses a command line and try to create a process.
      Parameters:
        `line` - the command line to parse
        `handler` - the handler to be notified about process creation

    - #### createProcess

          void createProcess(List<CliToken> line,
                             Handler<AsyncResult<Process>> handler)

      Try to create a process from the command line tokens.
      Parameters:
        `line` - the command line tokens
        `handler` - the handler to be notified about process creation

    - #### complete

          void complete(Completion completion)

      Perform completion, the completion argument will be notified of the completion progress.
      Parameters:
        `completion` - the completion object

    - #### registerCommand

          void registerCommand(Class<? extends Command> command)

      Register a command
      Parameters:
        `command` - the class of the command to register

    - #### registerCommand

          void registerCommand(Class<? extends Command> command,
                               Handler<AsyncResult<CommandRegistration>> doneHandler)

    - #### registerCommand

          void registerCommand(Command command)

      Register a command
      Parameters:
        `command` - the command to register

    - #### registerCommand

          void registerCommand(Command command,
                               Handler<AsyncResult<CommandRegistration>> doneHandler)

    - #### unregisterCommand

          void unregisterCommand(String commandName)

      Unregister a command.
      Parameters:
        `commandName` - the command name

    - #### unregisterCommand

          void unregisterCommand(String commandName,
                                 Handler<AsyncResult<Void>> doneHandler)

Copyright © 2015. All rights reserved.