1 26 27 package org.objectweb.openccm.Deployment; 28 29 37 public class ComponentServerImpl 38 extends org.omg.Components.Deployment.ComponentServerPOA 39 { 40 46 49 protected ComponentServerBase the_component_server_; 50 51 52 protected org.omg.Components.Deployment.ComponentServer component_server_ref_; 55 57 63 68 public 69 ComponentServerImpl( 71 ) 72 { 73 the_component_server_ = new ComponentServerBase () ; 74 } 75 76 81 public ComponentServerImpl(org.omg.Components.ConfigValue[] config){ 82 the_component_server_ = new ComponentServerBase(config); 83 } 84 85 91 97 public org.objectweb.openccm.Deployment.ComponentServerBase 98 _delegate() 99 { 100 return the_component_server_; 101 } 102 103 107 public org.omg.Components.Deployment.ComponentServer 108 asComponentServer() 109 { 110 111 115 if( component_server_ref_==null) 117 { 118 org.omg.CORBA.Object ref = this._this_object(org.objectweb.openccm.corba.TheORB.getORB()); 119 component_server_ref_ = org.omg.Components.Deployment.ComponentServerHelper.narrow(ref); 120 } 121 return component_server_ref_; 122 } 123 125 126 136 public void 137 unregister_container(org.omg.Components.Deployment.Container ref) 138 throws org.omg.Components.RemoveFailure 139 { 140 the_component_server_.unregister_container(ref); 141 } 142 143 145 151 158 public org.omg.Components.ConfigValue[] 159 configuration() 160 { 161 return the_component_server_.configuration () ; 162 } 163 164 174 public void 175 configuration(org.omg.Components.ConfigValue[] config) 176 { 177 the_component_server_.configuration (config); 178 } 179 180 187 public org.omg.Components.Deployment.ServerActivator 188 get_server_activator() 189 { 190 return the_component_server_.get_server_activator (); 191 } 192 193 200 public org.omg.Components.Deployment.Container 201 create_container(org.omg.Components.ConfigValue[] config) 202 throws org.omg.Components.CreateFailure, 203 org.omg.Components.Deployment.InvalidConfiguration 204 { 205 206 return the_component_server_.create_container (this,config); 207 } 208 209 216 public void 217 remove_container(org.omg.Components.Deployment.Container ref) 218 throws org.omg.Components.RemoveFailure 219 { 220 the_component_server_.remove_container (ref); 221 } 222 223 230 public org.omg.Components.Deployment.Container[] 231 get_containers() 232 { 233 return the_component_server_.get_containers(); 234 } 235 236 243 public void 244 remove() 245 throws org.omg.Components.RemoveFailure 246 { 247 248 the_component_server_.remove (); 249 250 try { 253 254 org.objectweb.openccm.corba.TheRootPOA.getRootPOA() 255 .deactivate_object( 256 org.objectweb.openccm.corba.TheRootPOA. 257 getRootPOA().reference_to_id(asComponentServer())); 258 259 } catch (org.omg.PortableServer.POAPackage.WrongAdapter ex) { 260 throw new org.omg.Components.RemoveFailure(); 261 } catch (org.omg.PortableServer.POAPackage.WrongPolicy ex) { 262 throw new org.omg.Components.RemoveFailure(); 263 } catch (org.omg.PortableServer.POAPackage.ObjectNotActive ex) { 264 throw new org.omg.Components.RemoveFailure(); 265 } 266 } 268 } 269 270 271 272 273 274 275 276 277 | Popular Tags |