Interface Command


public interface Command
A Vert.x Shell command, it can be created from any language using the CommandBuilder.command(String) or from a Java class using create(Vertx, Class)
Author:
Julien Viet
  • Method Details

    • create

      static Command create(Vertx vertx, Class<? extends AnnotatedCommand> clazz)
      Create a command from a Java class, annotated with Vert.x Core CLI annotations.
      Parameters:
      vertx - the vertx instance
      clazz - the class of the command
      Returns:
      the command object
    • name

      default String name()
      Returns:
      the command name
    • cli

      default CLI cli()
      Returns:
      the command line interface, can be null
    • createProcess

      default Process createProcess()
      Create a new process with empty arguments.
      Returns:
      the process
    • createProcess

      Process createProcess(List<CliToken> args)
      Create a new process with the passed arguments.
      Parameters:
      args - the process arguments
      Returns:
      the process
    • complete

      default void complete(Completion completion)
      Perform command completion, when the command is done completing it should call Completion.complete(List) or Completion.complete(String, boolean) )} method to signal completion is done.
      Parameters:
      completion - the completion object