*/
public Object invoke(String functionName, Object[] args, Class responseClass, Map contexts) {
Context cx = Context.enter();
try {
Function function = getFunction(scriptScope, functionName);
Scriptable invocationScope = getInvocationScope(cx, contexts);
Object[] jsArgs = processArgs(functionName, args, invocationScope);
Object jsResponse = function.call(cx, invocationScope, invocationScope, jsArgs);
Object response = processResponse(functionName, jsResponse, responseClass);
return response;
} finally {