org.finra.jtaf.core.commands
Class Repeat
java.lang.Object
org.finra.jtaf.core.model.invocationtarget.InvocationTarget
org.finra.jtaf.core.model.invocationtarget.Command
org.finra.jtaf.core.commands.Repeat
public class Repeat
- extends Command
This command surrounds a block of commands to be repeatedly executed based on
the value of the iterations parameter.
Constructor Summary |
Repeat(String name)
This called when instantiating the command before it is executed by the
interpreter.The recordResult variable is set to false because details
about the Repeat step aren't needed, unlike the commands within the
Repeat block. |
Method Summary |
protected void |
execute(IInvocationContext ctx)
This simply loops through and executes all commands within the Repeat
block. |
Methods inherited from class org.finra.jtaf.core.model.invocationtarget.Command |
acceptInvocationTargetVisitor, clearContext, deinitialize, executeInvocation, getBooleanOrDefault, getContext, getFloatOrDefault, getIntegerOrDefault, getOptionalObject, getOptionalString, getRequiredBoolean, getRequiredFloat, getRequiredInteger, getRequiredObject, getRequiredString, getStringOrDefault, initialize, launch, recordResult |
Methods inherited from class org.finra.jtaf.core.model.invocationtarget.InvocationTarget |
addOptionalParameter, addProduction, addRequiredParameter, cleanGlobalContext, getAllParameters, getFromGlobalContext, getGlobalContext, getName, getOptionalParameters, getProductions, getRequiredParameters, getUsage, putToGlobalContext, setGlobalContext, setUsage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Repeat
public Repeat(String name)
throws NameFormatException
- This called when instantiating the command before it is executed by the
interpreter.The recordResult variable is set to false because details
about the Repeat step aren't needed, unlike the commands within the
Repeat block.
- Parameters:
name
- - name of the command
- Throws:
NameFormatException
execute
protected void execute(IInvocationContext ctx)
throws Throwable
- This simply loops through and executes all commands within the Repeat
block. This is repeated for the specified iterations.
- Specified by:
execute
in class Command
- Parameters:
ctx
- - The current context when this method is executed.
- Throws:
Throwable
- - Any exception thrown by a command within the Repeat block.
Copyright © 2014. All rights reserved.