A registry that contains the commands known by a shell.
It is a mutable command resolver.Constructor and description |
---|
CommandRegistry
(java.lang.Object delegate) |
Type | Name and description |
---|---|
static CommandRegistry |
create(Vertx vertx) Create a new registry. |
java.lang.Object |
getDelegate() |
static CommandRegistry |
getShared(Vertx vertx) Get the shared registry for the Vert.x instance. |
CommandRegistry |
registerCommand(Command command) Like CommandRegistry.registerCommand, without a completion handler. |
CommandRegistry |
registerCommand(Command command, io.vertx.core.Handler<io.vertx.core.AsyncResult<Command>> completionHandler) Register a command |
CommandRegistry |
registerCommands(java.util.List<Command> commands) Like CommandRegistry.registerCommands, without a completion handler. |
CommandRegistry |
registerCommands(java.util.List<Command> commands, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Command>>> completionHandler) Register a list of commands. |
CommandRegistry |
unregisterCommand(java.lang.String commandName) Like CommandRegistry.unregisterCommand, without a completion handler. |
CommandRegistry |
unregisterCommand(java.lang.String commandName, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler) Unregister a command. |
Methods inherited from class | Name |
---|---|
class CommandResolver |
baseCommands, commands, getCommand, getDelegate |
Create a new registry.
vertx
- the vertx instanceGet the shared registry for the Vert.x instance.
vertx
- the vertx instanceLike CommandRegistry.registerCommand, without a completion handler.
Register a command
command
- the command to registercompletionHandler
- notified when the command is registeredLike CommandRegistry.registerCommands, without a completion handler.
Register a list of commands.
commands
- the commands to registercompletionHandler
- notified when the command is registeredLike CommandRegistry.unregisterCommand, without a completion handler.
Unregister a command.
commandName
- the command namecompletionHandler
- notified when the command is unregistered