1 26 27 package org.objectweb.openccm.Deployment.listener; 28 29 30 import org.objectweb.openccm.Deployment.ContainerLocal; 31 32 40 public abstract class ContainerListenerBase 41 extends org.omg.CORBA.LocalObject 42 implements ContainerListener 43 { 44 52 protected ContainerListener delegate_; 53 54 57 protected ContainerLocal source_; 58 59 69 protected 70 ContainerListenerBase(ContainerLocal source) 71 { 72 delegate_ = null; 73 source_ = source; 74 } 75 76 80 protected 81 ContainerListenerBase() 82 { 83 this(null) ; 84 } 85 86 96 protected abstract ContainerListener 97 _new(); 98 99 105 118 public void 119 set_delegate (ContainerListener listener) 120 { 121 set_source(listener.get_source()); 122 if (delegate_ == null) 123 delegate_ = listener; 124 else 125 delegate_.set_delegate (listener); 126 } 127 128 136 public ContainerLocal 137 get_source() 138 { 139 return source_; 140 } 141 142 150 public void 151 set_source(ContainerLocal home) 152 { 153 source_ = home; 154 } 155 156 164 public void 165 configure_container(ContainerLocal container) 166 { 167 container.add_listener(_new()); 168 } 169 170 178 public abstract CCMHomeListener 179 get_sub_listener(); 180 181 194 public abstract void 195 on_create (org.omg.Components.CCMHome ref) ; 196 197 205 public abstract void 206 on_add (org.omg.Components.CCMHome ref) ; 207 208 216 public abstract void 217 on_remove (org.omg.Components.CCMHome ref) ; 218 219 226 public abstract void 227 on_destroy () ; 228 } 229 230 231 | Popular Tags |