Class CompositeAction

  • All Implemented Interfaces:
    java.lang.Runnable, Action

    public class CompositeAction
    extends ActionBase
    A group of Actions to be executed in sequence.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Action[] actions
      Actions to perform.
      private boolean stopOnError
      Stop on error.
    • Constructor Summary

      Constructors 
      Constructor Description
      CompositeAction​(java.util.List actions, boolean stopOnError)
      Construct a new composite action.
    • Field Detail

      • actions

        private final Action[] actions
        Actions to perform.
      • stopOnError

        private final boolean stopOnError
        Stop on error.
    • Constructor Detail

      • CompositeAction

        public CompositeAction​(java.util.List actions,
                               boolean stopOnError)
        Construct a new composite action.
        Parameters:
        actions - list of actions, may not be null.
        stopOnError - if true, stop on the first false return value or exception.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class ActionBase
      • execute

        public boolean execute()
                        throws java.io.IOException
        Execute sequence of actions.
        Specified by:
        execute in interface Action
        Specified by:
        execute in class ActionBase
        Returns:
        true if all actions were successful.
        Throws:
        java.io.IOException - on IO error.