1 26 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.binder; 27 28 import java.util.LinkedList ; 29 30 import org.objectweb.openccm.descriptor.componentassembly.Connections; 31 import org.objectweb.openccm.descriptor.componentassembly.beans.ConnectionsBean; 32 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.ChildDeployerContext; 33 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.InitializationError; 34 35 43 public class ConnectionsDeployerContext 44 extends ChildDeployerContext 45 { 46 private LinkedList connectinterfaceDeployers; 52 private LinkedList connecteventDeployers; 53 private ConnectionsBean connections; 54 public ConnectionsDeployerContext() 60 { 61 this.connecteventDeployers=new LinkedList (); 62 this.connectinterfaceDeployers=new LinkedList (); 63 } 64 65 76 public void 77 connectConnections(ConnectionsBean connections) 78 { 79 this.connections=connections; 80 connectDeployerDescription(connections); 81 } 82 public Connections 83 getConnections() 84 { 85 return connections; 86 } 87 88 89 public void 90 connectConnectinterfaceDeployer(ConnectinterfaceDeployer connect) 91 { 92 this.connectinterfaceDeployers.addLast(connect); 93 } 94 95 public ConnectinterfaceDeployer [] 96 getConnectinterfaceDeployers() 97 { 98 return (ConnectinterfaceDeployer[]) 99 connectinterfaceDeployers 100 .toArray(new ConnectinterfaceDeployer[connectinterfaceDeployers.size()]); 101 } 102 103 public void 104 connectConnecteventDeployer(ConnecteventDeployer connect) 105 { 106 this.connecteventDeployers.addLast(connect); 107 } 108 109 public ConnecteventDeployer [] 110 getConnecteventDeployers() 111 { 112 return (ConnecteventDeployer[]) 113 connecteventDeployers 114 .toArray(new ConnecteventDeployer[connecteventDeployers.size()]); 115 } 116 117 124 public void 125 initialize() 126 throws InitializationError 127 { 128 if(getConnections()==null) 129 getErrorManager() 130 .submitException(new InitializationError(this,"Connection on connection bean is required"+ 131 "check the handler code it must specify this connection")); 132 getLifeCycleManager().stepEndedSuccessFully(); 133 } 134 135 } 136 | Popular Tags |