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 Summary
Modifier and TypeMethodDescriptiondefault CLIcli()default voidcomplete(Completion completion) Perform command completion, when the command is done completing it should callCompletion.complete(List)orCompletion.complete(String, boolean))} method to signal completion is done.static Commandcreate(Vertx vertx, Class<? extends AnnotatedCommand> clazz) Create a command from a Java class, annotated with Vert.x Core CLI annotations.default ProcessCreate a new process with empty arguments.createProcess(List<CliToken> args) Create a new process with the passed arguments.default Stringname()
-
Method Details
-
create
Create a command from a Java class, annotated with Vert.x Core CLI annotations.- Parameters:
vertx- the vertx instanceclazz- the class of the command- Returns:
- the command object
-
name
- Returns:
- the command name
-
cli
- Returns:
- the command line interface, can be null
-
createProcess
-
createProcess
-
complete
Perform command completion, when the command is done completing it should callCompletion.complete(List)orCompletion.complete(String, boolean))} method to signal completion is done.- Parameters:
completion- the completion object
-