Package io.vertx.ext.shell.command
Interface CommandBuilder
-
public interface CommandBuilderA build for Vert.x Shell command.- Author:
- Julien Viet
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Commandbuild(Vertx vertx)Build the commandstatic CommandBuildercommand(CLI cli)Create a new commmand with itsCLIdescriptor.static CommandBuildercommand(String name)Create a new commmand builder, the command is responsible for managing the options and arguments via thearguments.CommandBuildercompletionHandler(Handler<Completion> handler)Set the command completion handler, the completion handler when the user asks for contextual command line completion, usually hitting the tab key.CommandBuilderprocessHandler(Handler<CommandProcess> handler)Set the command process handler, the process handler is called when the command is executed.
-
-
-
Method Detail
-
command
static CommandBuilder command(String name)
Create a new commmand builder, the command is responsible for managing the options and arguments via thearguments.- Parameters:
name- the command name- Returns:
- the command
-
command
static CommandBuilder command(CLI cli)
Create a new commmand with itsCLIdescriptor. This command can then retrieve the parsedCommandProcess.commandLine()when it executes to know get the command arguments and options.- Parameters:
cli- the cli to use- Returns:
- the command
-
processHandler
CommandBuilder processHandler(Handler<CommandProcess> handler)
Set the command process handler, the process handler is called when the command is executed.- Parameters:
handler- the process handler- Returns:
- this command object
-
completionHandler
CommandBuilder completionHandler(Handler<Completion> handler)
Set the command completion handler, the completion handler when the user asks for contextual command line completion, usually hitting the tab key.- Parameters:
handler- the completion handler- Returns:
- this command object
-
-