public class CompositeAction extends AbstractAction
Modifier and Type | Field and Description |
---|---|
private Action[] |
actions
Actions to perform.
|
private boolean |
stopOnError
Stop on error.
|
LOGGER
Constructor and Description |
---|
CompositeAction(java.util.List<Action> actions,
boolean stopOnError)
Construct a new composite action.
|
Modifier and Type | Method and Description |
---|---|
boolean |
execute()
Execute sequence of actions.
|
Action[] |
getActions() |
boolean |
isStopOnError() |
void |
run() |
java.lang.String |
toString() |
close, isComplete, isInterrupted, reportException
private final Action[] actions
private final boolean stopOnError
public CompositeAction(java.util.List<Action> actions, boolean stopOnError)
actions
- list of actions, may not be null.stopOnError
- if true, stop on the first false return value or exception.public void run()
run
in interface java.lang.Runnable
run
in class AbstractAction
public boolean execute() throws java.io.IOException
execute
in interface Action
execute
in class AbstractAction
java.io.IOException
- on IO error.public java.lang.String toString()
toString
in class java.lang.Object
public Action[] getActions()
public boolean isStopOnError()