1 2 package SOFA.Component.DCUP; 3 4 8 abstract public class ComponentBuilderImpl implements ComponentBuilder { 9 10 protected SOFA.Component.ComponentManager cm; 11 12 protected SOFA.SOFAnode.Run.Deployment.DeploymentDescriptor dd; 13 14 protected boolean updatable; 15 16 protected String fullInstanceName; 17 18 19 public boolean stopped; 20 21 public void initialize(SOFA.Component.ComponentManager cm, SOFA.SOFAnode.Run.Deployment.DeploymentDescriptor dd) throws SOFA.Component.ComponentLifecycleException { 22 this.cm = cm; 23 this.dd = dd; 24 fullInstanceName = dd.getInstanceName()+":"+dd.getInstanceId(); 25 updatable = false; 26 stopped = false; 27 } 28 29 34 protected DCUPComponentManager getCMConnectorFromRef(SOFA.Connector.Reference ref) throws SOFA.Component.InstantiationException { 35 SOFA.Component.DCUP.DCUPComponentManager aplcm = null; 36 try { 37 aplcm = (SOFA.Component.DCUP.DCUPComponentManager) SOFA.Connector.Boot.DCUPComponentManagerConnector.createClt(ref); 38 } catch (SOFA.Connector.ConnectorException e) { 39 throw new SOFA.Component.InstantiationException("Can't create connector to component manger", e); 40 } 41 return aplcm; 42 } 43 44 public boolean isUpdatable() { 45 return updatable; 46 } 47 48 public boolean isStopped() { 49 return stopped; 50 } 51 } 52 | Popular Tags |