1 26 27 package org.objectweb.openccm.explorer.CosTrading; 28 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.CosTrading.Link; 33 import org.omg.CosTrading.LinkPackage.LinkInfo; 34 35 42 public class LinkContext 43 implements Context 44 { 45 46 52 58 64 70 public Entry[] getEntries(Object object) { 71 Link link_ = (Link)object; 72 73 String [] names = link_.list_links(); 74 Entry[] values = new Entry[names.length]; 75 76 for (int i = 0; i < names.length; i++) { 77 try { 78 LinkInfo link = link_.describe_link(names[i]); 79 values[i] = new DefaultEntry(names[i], link); 80 } catch (org.omg.CosTrading.LinkPackage.IllegalLinkName ex) { 81 } catch (org.omg.CosTrading.LinkPackage.UnknownLinkName ex) { 83 } 85 } 86 return values; 87 } 88 89 } 90 | Popular Tags |