Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandRegistry

A registry that contains the commands known by a shell.

It is a mutable command resolver.

Hierarchy

Index

Methods

commands

getCommand

  • getCommand(name: string): Command
  • Returns a single command by its name.

    Parameters

    • name: string

    Returns Command

registerCommand

  • Register a command

    Parameters

    Returns PromiseLike<Command>

  • Register a command

    Parameters

    • command: Command
    • completionHandler: ((res: AsyncResult<Command>) => void) | Handler<AsyncResult<Command>>

    Returns CommandRegistry

registerCommands

  • Register a list of commands.

    Parameters

    Returns PromiseLike<Command>

  • Register a list of commands.

    Parameters

    • commands: Command
    • completionHandler: ((res: AsyncResult<Command>) => void) | Handler<AsyncResult<Command>>

    Returns CommandRegistry

unregisterCommand

  • unregisterCommand(commandName: string): PromiseLike<void>
  • unregisterCommand(commandName: string, completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): CommandRegistry
  • Unregister a command.

    Parameters

    • commandName: string

    Returns PromiseLike<void>

  • Unregister a command.

    Parameters

    • commandName: string
    • completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns CommandRegistry

Static baseCommands

Static create

  • Create a new registry.

    Parameters

    • vertx: Vertx

    Returns CommandRegistry

Static getShared

  • Get the shared registry for the Vert.x instance.

    Parameters

    • vertx: Vertx

    Returns CommandRegistry

Generated using TypeDoc