-
- All Implemented Interfaces:
-
org.enodeframework.commanding.CommandBus
public final class DefaultCommandBus implements CommandBus
-
-
Constructor Summary
Constructors Constructor Description DefaultCommandBus(String topic, String tag, CommandResultProcessor commandResultProcessor, SendMessageService sendMessageService, SerializeService serializeService)
-
Method Summary
Modifier and Type Method Description CompletableFuture<Boolean>sendAsync(CommandMessage<?> command)Send a command asynchronously. Booleansend(CommandMessage<?> command)Send a command synchronously. CompletableFuture<CommandResult>executeAsync(CommandMessage<?> command)Execute a command asynchronously with the default command return type. CompletableFuture<CommandResult>executeAsync(CommandMessage<?> command, CommandReturnType commandReturnType)Execute a command asynchronously with the specified command return type. CommandResultexecute(CommandMessage<?> command)Execute a command asynchronously with the default command return type. CommandResultexecute(CommandMessage<?> command, CommandReturnType commandReturnType)Execute a command synchronously with the specified command return type. -
-
Constructor Detail
-
DefaultCommandBus
DefaultCommandBus(String topic, String tag, CommandResultProcessor commandResultProcessor, SendMessageService sendMessageService, SerializeService serializeService)
-
-
Method Detail
-
sendAsync
CompletableFuture<Boolean> sendAsync(CommandMessage<?> command)
Send a command asynchronously.
- Parameters:
command- The command to send.
-
send
Boolean send(CommandMessage<?> command)
Send a command synchronously.
-
executeAsync
CompletableFuture<CommandResult> executeAsync(CommandMessage<?> command)
Execute a command asynchronously with the default command return type.
- Parameters:
command- The command to execute.
-
executeAsync
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
CommandResult execute(CommandMessage<?> command)
Execute a command asynchronously with the default command return type.
-
execute
CommandResult execute(CommandMessage<?> command, CommandReturnType commandReturnType)
Execute a command synchronously with the specified command return type.
-
-
-
-