Class CommandRegistry
- java.lang.Object
-
- io.vertx.mutiny.ext.shell.command.CommandResolver
-
- io.vertx.mutiny.ext.shell.command.CommandRegistry
-
public class CommandRegistry extends CommandResolver
A registry that contains the commands known by a shell. It is a mutable command resolver. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<CommandRegistry>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description CommandRegistry(io.vertx.ext.shell.command.CommandRegistry delegate)
CommandRegistry(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommandRegistry
create(Vertx vertx)
boolean
equals(Object o)
io.vertx.ext.shell.command.CommandRegistry
getDelegate()
static CommandRegistry
getShared(Vertx vertx)
int
hashCode()
static CommandRegistry
newInstance(io.vertx.ext.shell.command.CommandRegistry arg)
io.smallrye.mutiny.Uni<Command>
registerCommand(Command command)
Register a commandCommand
registerCommandAndAwait(Command command)
Blocking variant ofregisterCommand(io.vertx.mutiny.ext.shell.command.Command)
.CommandRegistry
registerCommandAndForget(Command command)
Variant ofregisterCommand(io.vertx.mutiny.ext.shell.command.Command)
that ignores the result of the operation.io.smallrye.mutiny.Uni<List<Command>>
registerCommands(List<Command> commands)
Register a list of commands.List<Command>
registerCommandsAndAwait(List<Command> commands)
Blocking variant ofio.vertx.mutiny.ext.shell.command.CommandRegistry#registerCommands(List
.) CommandRegistry
registerCommandsAndForget(List<Command> commands)
Variant ofio.vertx.mutiny.ext.shell.command.CommandRegistry#registerCommands(List
that ignores the result of the operation.) String
toString()
io.smallrye.mutiny.Uni<Void>
unregisterCommand(String commandName)
Unregister a command.Void
unregisterCommandAndAwait(String commandName)
Blocking variant ofunregisterCommand(String)
.CommandRegistry
unregisterCommandAndForget(String commandName)
Variant ofunregisterCommand(String)
that ignores the result of the operation.-
Methods inherited from class io.vertx.mutiny.ext.shell.command.CommandResolver
baseCommands, commands, getCommand, newInstance
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<CommandRegistry> __TYPE_ARG
-
-
Constructor Detail
-
CommandRegistry
public CommandRegistry(io.vertx.ext.shell.command.CommandRegistry delegate)
-
CommandRegistry
public CommandRegistry(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.shell.command.CommandRegistry getDelegate()
- Overrides:
getDelegate
in classCommandResolver
-
toString
public String toString()
- Overrides:
toString
in classCommandResolver
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classCommandResolver
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classCommandResolver
-
getShared
public static CommandRegistry getShared(Vertx vertx)
- Parameters:
vertx
- the vertx instance- Returns:
- the shared registry
-
create
public static CommandRegistry create(Vertx vertx)
- Parameters:
vertx
- the vertx instance- Returns:
- the created registry
-
registerCommand
public io.smallrye.mutiny.Uni<Command> registerCommand(Command command)
Register a commandUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
command
- the command to register- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
registerCommandAndAwait
public Command registerCommandAndAwait(Command command)
Blocking variant ofregisterCommand(io.vertx.mutiny.ext.shell.command.Command)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
command
- the command to register- Returns:
- the Command instance produced by the operation.
-
registerCommandAndForget
public CommandRegistry registerCommandAndForget(Command command)
Variant ofregisterCommand(io.vertx.mutiny.ext.shell.command.Command)
that ignores the result of the operation.This method subscribes on the result of
registerCommand(io.vertx.mutiny.ext.shell.command.Command)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromregisterCommand(io.vertx.mutiny.ext.shell.command.Command)
but you don't need to compose it with other operations.- Parameters:
command
- the command to register- Returns:
- the instance of CommandRegistry to chain method calls.
-
registerCommands
public io.smallrye.mutiny.Uni<List<Command>> registerCommands(List<Command> commands)
Register a list of commands.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
commands
- the commands to register- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
registerCommandsAndAwait
public List<Command> registerCommandsAndAwait(List<Command> commands)
Blocking variant ofio.vertx.mutiny.ext.shell.command.CommandRegistry#registerCommands(List
.) This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
commands
- the commands to register- Returns:
- the List
instance produced by the operation.
-
registerCommandsAndForget
public CommandRegistry registerCommandsAndForget(List<Command> commands)
Variant ofio.vertx.mutiny.ext.shell.command.CommandRegistry#registerCommands(List
that ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.ext.shell.command.CommandRegistry#registerCommands(List
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.ext.shell.command.CommandRegistry#registerCommands(List
but you don't need to compose it with other operations.) - Parameters:
commands
- the commands to register- Returns:
- the instance of CommandRegistry to chain method calls.
-
unregisterCommand
public io.smallrye.mutiny.Uni<Void> unregisterCommand(String commandName)
Unregister a command.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
commandName
- the command name- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
unregisterCommandAndAwait
public Void unregisterCommandAndAwait(String commandName)
Blocking variant ofunregisterCommand(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
commandName
- the command name- Returns:
- the Void instance produced by the operation.
-
unregisterCommandAndForget
public CommandRegistry unregisterCommandAndForget(String commandName)
Variant ofunregisterCommand(String)
that ignores the result of the operation.This method subscribes on the result of
unregisterCommand(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromunregisterCommand(String)
but you don't need to compose it with other operations.- Parameters:
commandName
- the command name- Returns:
- the instance of CommandRegistry to chain method calls.
-
newInstance
public static CommandRegistry newInstance(io.vertx.ext.shell.command.CommandRegistry arg)
-
-