Class CommandRequest


  • @Immutable
    public abstract class CommandRequest
    extends java.lang.Object
    • Constructor Detail

      • CommandRequest

        public CommandRequest()
    • Method Detail

      • getCommands

        public abstract java.util.List<BaseCommand> getCommands()
      • getCommandCombinations

        public abstract java.util.List<CommandCombination> getCommandCombinations()
      • 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 CommandIds
        commands - all the commands
        Returns:
        the command request