1 package org.objectweb.proactive.core.group; 2 3 import java.util.Vector ; 4 5 import org.objectweb.proactive.core.body.future.FutureProxy; 6 import org.objectweb.proactive.core.mop.MOP; 7 import org.objectweb.proactive.core.mop.Proxy; 8 import org.objectweb.proactive.core.mop.StubObject; 9 10 11 public abstract class AbstractProcessForGroup { 12 13 protected static Proxy findLastProxy (Object obj) { 14 if (!MOP.isReifiedObject(obj)) { 15 return null; 16 } 17 Proxy proxy = ((StubObject) obj).getProxy(); 18 while (proxy instanceof FutureProxy) { 19 if (MOP.isReifiedObject(((FutureProxy) proxy).getResult())) { 20 return AbstractProcessForGroup.findLastProxy(((FutureProxy) proxy).getResult()); 21 } 22 else { 23 return proxy; 24 } 25 } 26 return proxy; 27 } 28 29 protected Vector memberList; 30 31 protected ProxyForGroup proxyGroup; 32 33 public int getMemberListSize() { 34 if (memberList != null) { 35 return memberList.size(); 36 } else { 37 return 0; 38 } 39 } 40 } 41 | Popular Tags |