1 26 27 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.binder; 28 29 31 38 39 public class ConnectinterfaceDeployer 40 extends ConnectinterfaceDeployerContext 41 { 42 public class CannotResolveReferenceException extends Exception {}; 49 50 66 67 73 public void deploy() 74 throws ConnectInterfaceEstablishmentFailureException 75 { 76 try{ 77 org.omg.CORBA.Object providedObject=null ; 78 79 if(getProvidesportDeployer()!=null){ 80 providedObject = getProvidesportDeployer().getProvidedPort(); 81 } 82 else if(getHomeinterfaceDeployer()!=null){ 83 providedObject =getHomeinterfaceDeployer().getHome(); 84 } 85 else if(getComponentsupportedinterfaceDeployer()!=null){ 86 providedObject=getComponentsupportedinterfaceDeployer().resolveComponent(); 87 } 88 else if(getExistinginterfaceDeployer()!=null){ 89 providedObject= getExistinginterfaceDeployer().getCorbaObject(); 90 } 91 92 if(providedObject==null) 93 throw new ConnectInterfaceEstablishmentFailureException(this,null); 94 95 getUsesportDeployer().establishConnection(providedObject); 96 97 } 98 catch(Exception e) 99 { 100 throw new ConnectInterfaceEstablishmentFailureException(this,e); 101 } 102 getLifeCycleManager().stepEndedSuccessFully(); 103 } 104 105 111 public void 112 tearDown() 113 throws ConnectInterfaceBreakingFailureException 114 { 115 try 116 { 117 getUsesportDeployer().breakConnection(); 118 } 119 catch(Exception e) 120 { 121 throw new ConnectInterfaceBreakingFailureException(this,e); 122 } 123 getLifeCycleManager().stepEndedSuccessFully(); 124 } 125 126 } 127 | Popular Tags |