Package io.vertx.ext.shell.command
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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static CommandRegistry
create(Vertx vertx)
Create a new registry.static CommandRegistry
getShared(Vertx vertx)
Get the shared registry for the Vert.x instance.Future<Command>
registerCommand(Command command)
Register a commandFuture<Command>
registerCommand(Class<? extends AnnotatedCommand> command)
Register a single command.Future<List<Command>>
registerCommands(List<Command> commands)
Register a list of commands.Future<Void>
unregisterCommand(String commandName)
Unregister a command.-
Methods inherited from interface io.vertx.ext.shell.command.CommandResolver
commands, getCommand
-
-
-
-
Method Detail
-
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
-
-