-
- All Implemented Interfaces:
public interface CommandBusRepresents a command service.
-
-
Method Summary
Modifier and Type Method Description abstract CompletableFuture<Boolean>sendAsync(CommandMessage<?> command)Send a command asynchronously. abstract Booleansend(CommandMessage<?> command)Send a command synchronously. abstract CompletableFuture<CommandResult>executeAsync(CommandMessage<?> command)Execute a command asynchronously with the default command return type. abstract CompletableFuture<CommandResult>executeAsync(CommandMessage<?> command, CommandReturnType commandReturnType)Execute a command asynchronously with the specified command return type. abstract CommandResultexecute(CommandMessage<?> command)Execute a command asynchronously with the default command return type. abstract CommandResultexecute(CommandMessage<?> command, CommandReturnType commandReturnType)Execute a command synchronously with the specified command return type. -
-
Method Detail
-
sendAsync
abstract CompletableFuture<Boolean> sendAsync(CommandMessage<?> command)
Send a command asynchronously.
- Parameters:
command- The command to send.
-
send
abstract Boolean send(CommandMessage<?> command)
Send a command synchronously.
-
executeAsync
abstract CompletableFuture<CommandResult> executeAsync(CommandMessage<?> command)
Execute a command asynchronously with the default command return type.
- Parameters:
command- The command to execute.
-
executeAsync
abstract CompletableFuture<CommandResult> executeAsync(CommandMessage<?> command, CommandReturnType commandReturnType)
Execute a command asynchronously with the specified command return type.
- Parameters:
command- The command to execute.commandReturnType- The return type of the command.
-
execute
abstract CommandResult execute(CommandMessage<?> command)
Execute a command asynchronously with the default command return type.
-
execute
abstract CommandResult execute(CommandMessage<?> command, CommandReturnType commandReturnType)
Execute a command synchronously with the specified command return type.
-
-
-
-