Class CommandRequest

java.lang.Object
io.iworkflow.core.command.CommandRequest

@Immutable public abstract class CommandRequest extends Object
  • Field Details

  • Constructor Details

    • CommandRequest

      public CommandRequest()
  • Method Details

    • getCommands

      public abstract List<BaseCommand> getCommands()
    • getCommandCombinations

      public abstract 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(List<List<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 CommandIds
      commands - all the commands
      Returns:
      the command request