Added abort() method to let the Engine/Evaluator know that the current
execution is being aborted (usually due to a request timeout).
This commit is contained in:
parent
9eb0955806
commit
495495da18
2 changed files with 15 additions and 1 deletions
|
@ -42,6 +42,11 @@ public interface ScriptingEngine {
|
|||
public Object invoke (Object thisObject, String functionName, Object[] args)
|
||||
throws ScriptingException;
|
||||
|
||||
/**
|
||||
* Let the evaluator know that the current evaluation has been aborted.
|
||||
*/
|
||||
public void abort ();
|
||||
|
||||
/**
|
||||
* Get a property on an object
|
||||
*/
|
||||
|
|
|
@ -407,6 +407,15 @@ public final class FesiEvaluator implements ScriptingEngine {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Let the evaluator know that the current evaluation has been
|
||||
* aborted. This is done by setting the thread ref in the evaluator
|
||||
* object to null.
|
||||
*/
|
||||
public void abort () {
|
||||
evaluator.thread = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if an object has a function property (public method if it
|
||||
|
|
Loading…
Add table
Reference in a new issue