1 26 27 package org.objectweb.openccm.Deployment.listener; 28 29 import org.objectweb.openccm.Deployment.ComponentServerLocal; 30 import org.objectweb.openccm.Deployment.listener.ComponentServerListener; 31 32 40 public abstract class ComponentServerListenerBase 41 extends org.omg.CORBA.LocalObject 42 implements ComponentServerListener 43 { 44 52 protected ComponentServerListener delegate_; 53 54 57 protected ComponentServerLocal source_; 58 59 69 protected 70 ComponentServerListenerBase(ComponentServerLocal source) 71 { 72 delegate_ = null; 73 source_ = source; 74 } 75 76 80 protected 81 ComponentServerListenerBase() 82 { 83 this(null) ; 84 } 85 86 96 protected abstract ComponentServerListener 97 _new(); 98 99 100 106 119 public void 120 set_delegate (ComponentServerListener listener) 121 { 122 set_source(listener.get_source()); 123 if (delegate_ == null) 124 { 125 delegate_ = listener; 126 } 127 else 128 delegate_.set_delegate (listener); 129 } 130 131 139 public ComponentServerLocal 140 get_source() 141 { 142 return source_; 143 } 144 145 153 public void 154 set_source(ComponentServerLocal home) 155 { 156 source_ = home; 157 } 158 159 167 public void 168 configure_component_server(ComponentServerLocal component_server) 169 { 170 component_server.add_listener(_new()); 171 } 172 173 181 public abstract ContainerListener 182 get_sub_listener(); 183 184 185 198 public abstract void 199 on_create (org.omg.Components.Deployment.Container cont_ref) ; 200 201 209 public abstract void 210 on_add (org.omg.Components.Deployment.Container cont_ref) ; 211 212 220 public abstract void 221 on_remove (org.omg.Components.Deployment.Container cont_ref); 222 223 230 public abstract void 231 on_destroy (); 232 } 233 234 235 236 237 238 239 240 | Popular Tags |