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:
hns 2002-09-04 14:00:28 +00:00
parent 9eb0955806
commit 495495da18
2 changed files with 15 additions and 1 deletions

View file

@ -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
*/

View file

@ -75,7 +75,7 @@ public final class FesiEvaluator implements ScriptingEngine {
evaluator.reval = this;
global = evaluator.getGlobalObject();
for (int i=0; i<extensions.length; i++)
evaluator.addExtension (extensions[i]);
evaluator.addExtension (extensions[i]);
HopExtension hopx = new HopExtension (app);
hopx.initializeExtension (this);
MailExtension mailx = (MailExtension) evaluator.addExtension ("helma.scripting.fesi.extensions.MailExtension");
@ -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