org.hawk.module.script
Class ExecParallelSingleLineScript

java.lang.Object
  extended by org.hawk.module.script.AbstractScript
      extended by org.hawk.module.script.SingleLineScript
          extended by org.hawk.module.script.ExecFunctionScript
              extended by org.hawk.module.script.ExecParallelSingleLineScript
All Implemented Interfaces:
IScript

public class ExecParallelSingleLineScript
extends ExecFunctionScript


Field Summary
 
Fields inherited from class org.hawk.module.script.AbstractScript
outerMultiLineScript
 
Constructor Summary
ExecParallelSingleLineScript()
           
 
Method Summary
static ExecParallelSingleLineScript createScript(java.util.Map<java.lang.Integer,java.lang.String> lineFunctionMatcherMap)
           
 Variable execute()
          This executes the contents of a script.
static java.util.regex.Pattern getPattern()
          ExecFunctionScript pattern.
 java.util.List<java.lang.Thread> getThreads()
           
 boolean reset()
           
 void setThreads(java.util.List<java.lang.Thread> threads)
           
 boolean waitforThreadsToFinish()
          This waits for all the hawk threads to finish their tasks.
 
Methods inherited from class org.hawk.module.script.ExecFunctionScript
cloneParamMap, execute, getFunctionName, getParamMap, getParams, isVariable, parseFunctionParameters, setFunctionName, setParamMap, setParams
 
Methods inherited from class org.hawk.module.script.SingleLineScript
addScripts, copy, findNearestOuterMLScript, getVariable, getVariableValue, setVariable, setVariableValue, toUI
 
Methods inherited from class org.hawk.module.script.AbstractScript
add, and, arrayBracket, assign, divide, equalTo, evaluateGlobalVariable, evaluateLocalBoolean, evaluateLocalVariable, getLineNumber, getOuterMultiLineScript, greaterThan, greaterThanEqualTo, isLastScript, lessThan, lessThanEqualTo, mangle, modulus, multiply, or, popLocalVars, pushLocalVars, refer, setLastScript, setLineNumber, setOuterMultiLineScript, subtract, toJava, toJavaMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecParallelSingleLineScript

public ExecParallelSingleLineScript()
Method Detail

getThreads

public java.util.List<java.lang.Thread> getThreads()

setThreads

public void setThreads(java.util.List<java.lang.Thread> threads)

getPattern

public static java.util.regex.Pattern getPattern()
ExecFunctionScript pattern.

Returns:
returns ExecFunctionScript
See Also:
ScriptPattern

createScript

public static ExecParallelSingleLineScript createScript(java.util.Map<java.lang.Integer,java.lang.String> lineFunctionMatcherMap)
                                                 throws HawkException
Throws:
HawkException

execute

public Variable execute()
                 throws HawkException
Description copied from interface: IScript
This executes the contents of a script. This returns either a boolean or double depending upon how a method is invoked.

Specified by:
execute in interface IScript
Overrides:
execute in class ExecFunctionScript
Returns:
the returned data is being used to test whether a function returns or not. Currently Hawk support two types return Double and Boolean.The implementation should look at the return type and script type to determine what action to be taken.
Throws:
HawkException

waitforThreadsToFinish

public boolean waitforThreadsToFinish()
This waits for all the hawk threads to finish their tasks.

Parameters:
allThreads - list of all threads which are started.
Returns:
true on success

reset

public boolean reset()