1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.binder; 27 28 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.util.CannotResolveReferenceException; 29 import org.omg.CORBA.Object ; 30 import org.omg.Components.AlreadyConnected; 31 import org.omg.Components.CCMObject; 32 import org.omg.Components.EventConsumerBase; 33 import org.omg.Components.InvalidConnection; 34 import org.omg.Components.InvalidName; 35 import org.omg.Components.NoConnection; 36 37 45 public class EmitsportDeployer 46 extends EmitsportDeployerContext 47 { 48 private CCMObject emitter; 54 74 private org.omg.Components.CCMObject 75 getCCMObjectEmitter() 76 throws CannotResolveReferenceException 77 78 { 79 Object ccm; 80 if(getComponentinstantiationDeployer()!=null) 81 ccm =getComponentinstantiationDeployer().getComponent(); 82 else ccm=getFindbyDeployer().resolveReference(); 83 84 return org.omg.Components. 85 CCMObjectHelper.narrow(ccm); 86 } 87 94 public void 95 connectEmiterToConsumer(EventConsumerBase consumedObject) 96 throws CannotResolveReferenceException, 97 InvalidName, 98 AlreadyConnected, 99 InvalidConnection 100 { 101 emitter=getCCMObjectEmitter(); 102 emitter.connect_consumer(getEmitsport() 103 .getEmitsidentifier() 104 .getValue() 105 ,consumedObject); 106 } 107 112 public void 113 disconnectConsumer() 114 throws InvalidName, 115 NoConnection 116 { 117 emitter.disconnect_consumer(getEmitsport() 118 .getEmitsidentifier() 119 .getValue()); 120 } 121 122 123 } 124 | Popular Tags |