Package cloud.commandframework.execution
Class AsynchronousCommandExecutionCoordinator<C>
java.lang.Object
cloud.commandframework.execution.CommandExecutionCoordinator<C>
cloud.commandframework.execution.AsynchronousCommandExecutionCoordinator<C>
- Type Parameters:
C- Command sender type
@API(status=STABLE)
public final class AsynchronousCommandExecutionCoordinator<C>
extends CommandExecutionCoordinator<C>
Execution coordinator parses and/or executes commands on a separate thread from the calling thread
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forAsynchronousCommandExecutionCoordinatorinstancesNested classes/interfaces inherited from class cloud.commandframework.execution.CommandExecutionCoordinator
CommandExecutionCoordinator.SimpleCoordinator<C> -
Method Summary
Modifier and TypeMethodDescription@NonNull CompletableFuture<CommandResult<C>>coordinateExecution(@NonNull CommandContext<C> commandContext, @NonNull Queue<@NonNull String> input) Coordinate the execution of a command and return the resultstatic <C> @NonNull AsynchronousCommandExecutionCoordinator.Builder<C>Create a newAsynchronousCommandExecutionCoordinator.BuilderinstanceMethods inherited from class cloud.commandframework.execution.CommandExecutionCoordinator
getCommandTree, simpleCoordinator
-
Method Details
-
newBuilder
Create a newAsynchronousCommandExecutionCoordinator.Builderinstance- Type Parameters:
C- Command sender type- Returns:
- Builder
-
coordinateExecution
public @NonNull CompletableFuture<CommandResult<C>> coordinateExecution(@NonNull CommandContext<C> commandContext, @NonNull Queue<@NonNull String> input) Description copied from class:CommandExecutionCoordinatorCoordinate the execution of a command and return the result- Specified by:
coordinateExecutionin classCommandExecutionCoordinator<C>- Parameters:
commandContext- Command contextinput- Command input- Returns:
- Future that completes with the result
-