public static Object create(DynamicProxyCodebaseAccessor proxy, ClassLoader streamLoader, Collection context) throws IOException { Class proxyClass = proxy.getClass(); if (proxy instanceof RemoteMethodControl //JERI && Proxy.isProxyClass(proxyClass) && getProvider(streamLoader).substitute(proxyClass, streamLoader) ) { // REMIND: InvocationHandler must be available locally, for now // it must be an instance of BasicInvocationHandler. InvocationHandler h = Proxy.getInvocationHandler(proxy); return new ProxySerializer( (CodebaseAccessor) Proxy.newProxyInstance(getProxyLoader(proxyClass), BOOTSTRAP_PROXY_INTERFACES, h ), proxy, context ); } return proxy; }
public static Object create(ProxyAccessor svc, ClassLoader streamLoader, Collection context) throws IOException{ Object proxy = svc.getProxy(); Class proxyClass = proxy != null ? proxy.getClass() : null; if (proxyClass == null ) LOGGER.log(Level.FINE, "Warning Proxy was null for {0}", svc.getClass()); if (proxy instanceof RemoteMethodControl //JERI && proxy instanceof CodebaseAccessor && Proxy.isProxyClass(proxyClass) && getProvider(streamLoader).substitute(proxyClass, streamLoader) ) { // REMIND: InvocationHandler must be available locally, for now // it must be an instance of BasicInvocationHandler. InvocationHandler h = Proxy.getInvocationHandler(proxy); return new ProxySerializer( (CodebaseAccessor) Proxy.newProxyInstance(getProxyLoader(proxyClass), BOOTSTRAP_PROXY_INTERFACES, h ), svc, context ); } return svc; }