return objects.elementAt(0);
}
- public final Object call(JS.Array args) throws JS.Exn {
- try {
- return call2(args);
- } catch (IOException se) {
- if (Log.on) Log.log(this, se);
- throw new JS.Exn("socket exception: " + se);
-
- } catch (JS.Exn jse) {
- if (Log.on) Log.log(this, jse.toString());
- throw jse;
- }
+ public final Object call(final JS.Array args) throws JS.Exn {
+ final JS.Context cx = JS.Context.current();
+ Scheduler.add(new Scheduler.Task() { public void perform() {
+ Object ret;
+ try {
+ ret = call2(args);
+ } catch (IOException se) {
+ if (Log.on) Log.log(this, se);
+ throw new JS.Exn("socket exception: " + se);
+ }
+ cx.resume(ret);
+ } });
+ return JS.Context.pause;
}
/** When you get a property from an XMLRPC, it just returns another XMLRPC with the property name tacked onto methodname. */