1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.installer; 27 28 import org.objectweb.openccm.descriptor.componentassembly.beans.HomeplacementBean; 30 import org.objectweb.openccm.descriptor.componentassembly.beans.HostcollocationBeanImpl; 31 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.HandlerBase; 32 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.InitializationError; 33 41 public class HostcollocationDeployerHandler 42 extends HandlerBase 43 { 44 private HostcollocationDeployer _deploy; 50 73 public Object 74 getInstance(HostcollocationBeanImpl host) 75 throws InitializationError 76 { 77 if(_deploy==null){ 78 _deploy=new HostcollocationDeployer(); 79 _deploy.connectHostcollocation(host); 80 applyCommonConfig(_deploy); 81 DestinationDeployerBase ddb=(DestinationDeployerBase) 82 getDeployer(host.getDestination()); 83 _deploy.connectDestinationDeployer(ddb); 84 85 for(java.util.Iterator i=host.getHomeplacementList().iterator();i.hasNext(); ){ 86 HomeplacementDeployer current=(HomeplacementDeployer) 87 getDeployer((HomeplacementBean)i.next()); 88 HostcollocationDestinationWrapper hdw=new HostcollocationDestinationWrapper(); 89 hdw.connectWrappedDestination(ddb); 90 hdw.connectImplementationDeployer(current.getImplementationDeployer()); 91 hdw.connectSoftpkgDeployer(current.getSoftpkgDeployer()); 92 _deploy.connectHomeplacementDeployer(current); 93 current.connectDestinationDeployer(hdw); 94 current.initialize(); 95 } 96 _deploy.initialize(); 97 } 98 99 return (_deploy); 100 } 101 102 } 103 | Popular Tags |