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
-
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
@CheckReturnValue 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
@CheckReturnValue 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 ofregisterCommands(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 ofregisterCommands(List)
that ignores the result of the operation.This method subscribes on the result of
registerCommands(List)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromregisterCommands(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
@CheckReturnValue 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)
-
-