1 26 27 package org.objectweb.openccm.Components; 28 29 38 39 public abstract class CCMHomeImpl 40 extends CCMHomeBase 41 implements org.omg.Components.KeylessCCMHomeOperations 42 { 43 49 55 59 protected 60 CCMHomeImpl() 61 { 62 } 63 64 70 73 protected final java.lang.String 74 _component_uid_() 75 { 76 return _the_home_executor()._the_component_uid(); 77 } 78 79 82 protected final java.lang.String 83 _home_uid_() 84 { 85 return _the_home_executor()._the_home_uid(); 86 } 87 88 91 protected final org.objectweb.openccm.Containers.HomeServant 92 _home_servant_() 93 { 94 return _the_home_executor()._home_servant(); 95 } 96 97 102 protected final org.omg.Components.CCMObject 103 _create() 104 throws org.omg.Components.CreateFailure 105 { 106 org.omg.Components.CCMObject ref = null; 107 108 ref = _home_servant_().the_PCA().create_component_reference(_home_servant_()); 110 listener_.on_create(ref); 111 112 components_.add(ref); 114 115 return ref; 116 } 117 118 125 protected final void 126 unregister_component(org.omg.Components.CCMObject comp) 127 throws org.omg.Components.RemoveFailure 128 { 129 listener_.on_remove(comp); 130 131 139 org.omg.Components.CCMObject[] components = get_components(); 141 for(int i=0; i<components.length; i++) 143 { 144 if(comp._is_equivalent(components[i])) 146 { 147 components_.remove(i); 149 break; 150 } 151 } 152 } 153 154 160 163 protected abstract org.objectweb.openccm.Containers.HomeExecutor 164 _the_home_executor(); 165 166 172 180 public final void 181 remove_component(org.omg.Components.CCMObject comp) 182 throws org.omg.Components.RemoveFailure 183 { 184 200 201 204 205 for(int i=0; i<components_.size(); i++) 207 { 208 org.omg.Components.CCMObject c = 209 (org.omg.Components.CCMObject)components_.get(i); 210 211 if(comp._is_equivalent(c)) 213 { 214 comp.remove(); 215 return; 216 } 217 } 218 219 throw new org.omg.Components.RemoveFailure(); 221 } 222 223 229 238 public final org.omg.Components.CCMObject 239 create_component() 240 throws org.omg.Components.CreateFailure 241 { 242 return _create(); 243 } 244 } 245 246 247 | Popular Tags |