1 26 27 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.binder; 28 29 30 39 40 41 public class ConnecteventDeployer 42 extends ConnecteventDeployerContext 43 { 44 50 private class CannotResolveReferenceException extends Exception {}; 51 52 58 59 65 71 72 79 public void 80 deploy() 81 throws ConnectEventEstablishmentFailureException 82 { 83 try{ 84 org.omg.Components.EventConsumerBase consumedObject=null ; 86 87 if(getConsumesportDeployer()!=null) 88 consumedObject=getConsumesportDeployer().getConsumer(); 89 else consumedObject=getExistinginterfaceDeployer().getEventConsumerBase(); 90 91 if(getEmitsportDeployer()!=null) 92 getEmitsportDeployer().connectEmiterToConsumer(consumedObject); 93 else getPublishesportDeployer().connectPublisherToConsumer(consumedObject); 94 } 95 catch(Exception e){ 96 throw new ConnectEventEstablishmentFailureException(this,e); 97 } 98 getLifeCycleManager().stepEndedSuccessFully(); 99 } 100 101 102 103 104 111 public void 112 tearDown() 113 throws ConnectEventBreakingFailureException 114 { 115 try{ 116 if(getEmitsportDeployer()!=null) 117 getEmitsportDeployer().disconnectConsumer(); 118 else getPublishesportDeployer().disconnectConsumer(); 119 } 120 catch(Exception e) 121 { 122 throw new ConnectEventBreakingFailureException(this,e); 123 } 124 125 getLifeCycleManager().stepEndedSuccessFully(); 126 } 127 128 } 129 | Popular Tags |