Package io.iworkflow.core.command
Class CommandRequest
- java.lang.Object
-
- io.iworkflow.core.command.CommandRequest
-
@Immutable public abstract class CommandRequest extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static CommandRequestempty
-
Constructor Summary
Constructors Constructor Description CommandRequest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CommandRequestforAllCommandCompleted(BaseCommand... commands)forAllCommandCompleted will wait for all the commands to completestatic CommandRequestforAnyCommandCombinationCompleted(java.util.List<java.util.List<java.lang.String>> commandCombinationLists, BaseCommand... commands)This will wait for any combination to complete.static CommandRequestforAnyCommandCompleted(BaseCommand... commands)forAnyCommandCompleted will wait for any the commands to completeabstract java.util.List<CommandCombination>getCommandCombinations()abstract java.util.List<BaseCommand>getCommands()abstract CommandWaitingTypegetCommandWaitingType()
-
-
-
Field Detail
-
empty
public static final CommandRequest empty
-
-
Method Detail
-
getCommands
public abstract java.util.List<BaseCommand> getCommands()
-
getCommandCombinations
public abstract java.util.List<CommandCombination> getCommandCombinations()
-
getCommandWaitingType
public abstract CommandWaitingType getCommandWaitingType()
-
forAllCommandCompleted
public static CommandRequest forAllCommandCompleted(BaseCommand... commands)
forAllCommandCompleted will wait for all the commands to complete- Parameters:
commands- all the commands- Returns:
- the command request
-
forAnyCommandCompleted
public static CommandRequest forAnyCommandCompleted(BaseCommand... commands)
forAnyCommandCompleted will wait for any the commands to complete- Parameters:
commands- all the commands- Returns:
- the command request
-
forAnyCommandCombinationCompleted
public static CommandRequest forAnyCommandCombinationCompleted(java.util.List<java.util.List<java.lang.String>> commandCombinationLists, BaseCommand... commands)
This will wait for any combination to complete. Using this requires every command has a commandId when created. Functionally this one can cover both forAllCommandCompleted, forAnyCommandCompleted. So the other two are like "shortcuts" of it.- Parameters:
commandCombinationLists- a list of different combinations, each combination is a list of String as CommandIdscommands- all the commands- Returns:
- the command request
-
-