org.enodeframework.commanding.ICommandService.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enode Show documentation
Show all versions of enode Show documentation
The enodeframework core implementation.
package org.enodeframework.commanding
import java.util.concurrent.CompletableFuture
/**
* Represents a command service.
*/
interface ICommandService {
/**
* Send a command asynchronously.
*
* @param command The command to send.
* @return A task which contains the send result of the command.
*/
fun sendAsync(command: ICommand): CompletableFuture
/**
* Execute a command asynchronously with the default command return type.
*
* @param command The command to execute.
* @return A task which contains the result of the command.
*/
fun executeAsync(command: ICommand): CompletableFuture
/**
* Execute a command asynchronously with the specified command return type.
*
* @param command The command to execute.
* @param commandReturnType The return type of the command.
* @return A task which contains the result of the command.
*/
fun executeAsync(command: ICommand, commandReturnType: CommandReturnType): CompletableFuture
}