Menu

#62 proxy-key components 2 support forwarding of remoted objs

open
nobody
5
2005-07-05
2005-05-16
Neil Avery
No

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;
}

Discussion

  • Neil Avery

    Neil Avery - 2005-05-16
    • priority: 5 --> 6
     
  • Neil Avery

    Neil Avery - 2005-05-16

    Logged In: YES
    user_id=922728

    Will function as a dynamic routing table

     
  • Neil Avery

    Neil Avery - 2005-07-05
    • priority: 6 --> 5
    • summary: Add proxy-key components --> proxy-key components 2 support forwarding of remoted objs
     

Log in to post a comment.