A proxy-key component contains key/address information
about where an object is. Incoming requests for a
key-(proxy object) will return the proxy-key marshalled
object to the client.
comment: marshalling is going to look at the
implementation of 'RemoteProxyWrapper' then assemble
address information. However, if this is already an
instance of a remoteproxywrapper we wont rewrap it up
-- just pass off the existing remoteproxywrapper.
Unmarshalling will behave as normall. This assumes that
RemoteProxyWrappers will be placed into the container
as part of the bind, leech-key process. (when peer is
super-node).
RemoteProxyWrapper ctor instances need to have the
local address placed into it.
public Object unmarshallInstance(Object instance,
URI localURI, URI remoteURI) {
if (instance instanceof RemoteProxyWrapper){
RemoteProxyWrapper instanceWrapper =
(RemoteProxyWrapper) instance;
byte[] bs = instanceWrapper.getBs();
String proxyClassName =
instanceWrapper.getProxyClassName();
try {
classloader.defineClass(proxyClassName, bs);
Object newInstance =
classloader.loadClass(proxyClassName, false).newInstance();
enable(instanceWrapper.getKey(),
newInstance, localURI, remoteURI);
return newInstance;
} catch (Exception e) {
}
return instance;
}
Logged In: YES
user_id=922728
Will function as a dynamic routing table