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 TypeMethodDescriptionstatic <C> @NonNull AsynchronousCommandExecutionCoordinator.Builder<C>builder()Create a newAsynchronousCommandExecutionCoordinator.Builderinstance.@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>Deprecated.Methods inherited from class cloud.commandframework.execution.CommandExecutionCoordinator
getCommandTree, simpleCoordinator
-
Method Details
-
builder
@API(status=STABLE, since="1.8.0") public static <C> @NonNull AsynchronousCommandExecutionCoordinator.Builder<C> builder()Create a newAsynchronousCommandExecutionCoordinator.Builderinstance.- Type Parameters:
C- sender type- Returns:
- new
AsynchronousCommandExecutionCoordinator.Builder - Since:
- 1.8.0
-
newBuilder
@API(status=DEPRECATED, since="1.8.0") @Deprecated public static <C> @NonNull AsynchronousCommandExecutionCoordinator.Builder<C> newBuilder()Deprecated.preferbuilder()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
-
builder()