1 19 20 package org.jacorb.notification.container; 21 22 import org.apache.avalon.framework.configuration.Configuration; 23 import org.omg.CORBA.ORB ; 24 import org.picocontainer.PicoContainer; 25 import org.picocontainer.PicoIntrospectionException; 26 import org.picocontainer.defaults.AbstractComponentAdapter; 27 28 class ConfigurationComponentAdapter extends AbstractComponentAdapter 29 { 30 private static final long serialVersionUID = 1L; 31 32 public ConfigurationComponentAdapter() 33 { 34 super(Configuration.class, Configuration.class); 35 } 36 37 public Object getComponentInstance(PicoContainer container) 38 { 39 ORB orb = (ORB ) container.getComponentInstance(ORB .class); 40 41 Configuration config = ((org.jacorb.orb.ORB) orb).getConfiguration(); 42 43 return config; 44 } 45 46 public void verify(PicoContainer container) 47 { 48 org.jacorb.orb.ORB jorb = 49 (org.jacorb.orb.ORB) container.getComponentInstance(ORB .class); 50 51 if (jorb == null) 52 { 53 throw new PicoIntrospectionException("Need JacORB ORB"); 54 } 55 } 56 } | Popular Tags |