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 Details

    • 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

      Future<Command> registerCommand(Class<? extends AnnotatedCommand> command)
      Register a single command.
      Parameters:
      command - the class of the command to register
      Returns:
      a future notified when the command is registered
    • registerCommand

      Future<Command> registerCommand(Command command)
      Register a command
      Parameters:
      command - the command to register
      Returns:
      a future notified when the command is registered
    • registerCommands

      Future<List<Command>> registerCommands(List<Command> commands)
      Register a list of commands.
      Parameters:
      commands - the commands to register
      Returns:
      a future notified when the command is registered
    • unregisterCommand

      Future<Void> unregisterCommand(String commandName)
      Unregister a command.
      Parameters:
      commandName - the command name
      Returns:
      a future notified when the command is unregistered