1 26 package org.objectweb.openccm.explorer.DCI; 27 28 import org.ist.coach.DCI.ExtHomeFinder; 29 import org.ist.coach.DCI.HomeInfo; 30 import org.objectweb.openccm.explorer.CORBA.TypageCORBA; 31 import org.objectweb.util.explorer.api.Context; 32 import org.objectweb.util.explorer.api.Entry; 33 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 34 35 42 public class HomeFinderContext 43 implements Context 44 { 45 46 52 58 64 protected String getName(org.omg.CORBA.Object o) { 65 TypageCORBA tc = new TypageCORBA(o, org.objectweb.openccm.corba.TheORB.getORB()); 66 return tc.getTypeID(); 67 } 68 69 75 78 public Entry[] getEntries(Object object) { 79 ExtHomeFinder homeFinder = (ExtHomeFinder) object; 80 HomeInfo[] homes = homeFinder.get_all_homes(); 81 Entry[] values = new Entry[homes.length]; 82 for (int i = 0; i < homes.length; i++) { 83 values[i] = new DefaultEntry(homes[i].uid, homes[i].home_ref); 85 } 86 return values; 87 } 88 89 } 90 | Popular Tags |