implemented direct callback into evaluator by its own thread.
This commit is contained in:
parent
fe7380600b
commit
7d4cbdeb48
1 changed files with 11 additions and 1 deletions
|
@ -652,6 +652,15 @@ public class RequestEvaluator implements Runnable {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Object invokeDirectFunction (Object obj, String functionName, Object[] args) throws Exception {
|
||||||
|
ESObject eso = getElementWrapper (obj);
|
||||||
|
ESValue[] esv = args == null ? new ESValue[0] : new ESValue[args.length];
|
||||||
|
for (int i=0; i<esv.length; i++)
|
||||||
|
esv[i] = ESLoader.normalizeValue (args[i], evaluator);
|
||||||
|
ESValue retval = eso.doIndirectCall (evaluator, eso, functionName, esv);
|
||||||
|
return retval.toJavaObject ();
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized Object invokeFunction (Object node, String functionName, Object[] args)
|
public synchronized Object invokeFunction (Object node, String functionName, Object[] args)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
ESObject obj = null;
|
ESObject obj = null;
|
||||||
|
@ -877,6 +886,7 @@ public class RequestEvaluator implements Runnable {
|
||||||
|
|
||||||
ObjectPrototype op = getPrototype (prototypeName);
|
ObjectPrototype op = getPrototype (prototypeName);
|
||||||
|
|
||||||
|
|
||||||
if (op == null)
|
if (op == null)
|
||||||
op = esNodePrototype;
|
op = esNodePrototype;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue