Class CompositeAction

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

    public class CompositeAction
    extends AbstractAction
    A group of Actions to be executed in sequence.
    • Constructor Detail

      • CompositeAction

        public CompositeAction​(java.util.List<Action> 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 AbstractAction
      • execute

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getActions

        public Action[] getActions()
      • isStopOnError

        public boolean isStopOnError()