| Instances of this class generate stub classes. They do this
by creating a byte[], and then passing it to the xlet's
ClassLoader. The method on ClassLoader is protected, so
we use reflection wrapped in a doPrivileged block to call it.
To give an example, suppose that a user class implemens a remote
interface UserIF,
and that interface contains two methods, void frob(Something), and
int glorp(float). This class will automatically generate
a remote stub. The stub will be equivalent to the following class:
package com.sun.jumpimpl.ixc;
import java.rmi.RemoteException;
public final class StubClass_stub42
extends com.sun.jumpimpl.ixc.StubObject
implements UserIF {
public StubClass_stub42(Object registry,
Object target) {
// Arguments are of type ImportedObjectRegistry and RemoteHandle
super(registry, target);
}
public void frob(Something arg1) throws RemoteException {
com_sun_xlet_execute("frob", new Object[] { arg1 });
}
public int glorp(float arg1) throws RemoteException {
Object r = com_sun_xlet_execute("glorb",new Object[] { new Float(arg1) });
return ((Integer) r).intValue();
}
}
|