1 26 package org.objectweb.openccm.explorer.Components; 27 28 import org.objectweb.openccm.explorer.CORBA.TypageCORBA; 29 import org.objectweb.util.explorer.api.Context; 30 import org.objectweb.util.explorer.api.Entry; 31 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 32 import org.omg.Components.EmitterDescription; 33 34 41 public class EmitterContext 42 implements Context { 43 44 50 56 62 protected String getName(org.omg.CORBA.Object o) { 63 TypageCORBA tc = new TypageCORBA(o, org.objectweb.openccm.corba.TheORB.getORB()); 64 return tc.getTypeID(); 65 } 66 67 73 76 public Entry[] getEntries(Object object) { 77 EmitterContainer emitter = (EmitterContainer)object; 78 EmitterDescription emitterDesc = emitter.getEmitter(); 79 if (emitterDesc.consumer == null) return new Entry[0]; 80 return new Entry[] {new DefaultEntry(getName(emitterDesc.consumer), emitterDesc.consumer)}; 81 } 82 } 83 | Popular Tags |