1 28 29 package org.objectweb.util.browser.plugins.fractal.context; 30 31 import java.util.Vector ; 32 33 import org.objectweb.fractal.api.Interface; 34 import org.objectweb.fractal.api.NoSuchInterfaceException; 35 import org.objectweb.fractal.api.control.BindingController; 36 import org.objectweb.util.browser.api.Entry; 37 import org.objectweb.util.browser.core.naming.AbstractContext; 38 import org.objectweb.util.browser.core.naming.DefaultEntry; 39 import org.objectweb.util.browser.core.naming.DefaultName; 40 41 47 public class BindingControllerContext 48 extends AbstractContext 49 { 50 51 57 58 private BindingController bc_ = null; 59 60 66 72 78 82 public Entry[] getEntries() { 83 String [] itfs = bc_.listFc() ; 84 Vector entries = new Vector (); 85 for (int i=0 ; i < itfs.length ; i++) { 86 try { 87 Interface itf = (Interface)bc_.lookupFc(itfs[i]); 88 entries.add(new DefaultEntry(new ClientInterfaceWrapper(itf), 89 new DefaultName(itfs[i]), this)); 90 } catch (NoSuchInterfaceException e) { } 91 } 92 return (Entry[]) entries.toArray(new Entry[0]); 93 } 94 95 101 105 public void setWrapped(Object object) { 106 bc_ = (BindingController) object; 107 } 108 109 113 public Object getWrapped() { 114 return bc_; 115 } 116 } | Popular Tags |