1 25 26 package org.objectweb.openccm.Deployment.listener; 27 28 import org.objectweb.openccm.Deployment.CCMHomeLocal; 29 30 38 public abstract class CCMHomeListenerBase 39 extends org.omg.CORBA.LocalObject 40 implements CCMHomeListener 41 { 42 50 protected CCMHomeListener delegate_; 51 52 55 protected CCMHomeLocal source_; 56 57 67 protected 68 CCMHomeListenerBase(CCMHomeLocal source) 69 { 70 source_ = source; 71 delegate_ = null; 72 } 73 74 78 protected 79 CCMHomeListenerBase() 80 { 81 this(null); 82 } 83 84 94 protected abstract CCMHomeListener 95 _new(); 96 97 103 113 public void 114 set_delegate(CCMHomeListener listener) 115 { 116 if (delegate_ == null) 117 { 118 delegate_ = listener; 119 source_ = listener.get_source(); 120 } 121 else 122 delegate_.set_delegate (listener); 123 } 124 125 130 public CCMHomeLocal 131 get_source() 132 { 133 return source_; 134 } 135 136 141 public void 142 set_source(CCMHomeLocal home) 143 { 144 source_ = home; 145 } 146 147 152 public void 153 configure_ccm_home(CCMHomeLocal home) 154 { 155 home.add_listener(_new()); 156 } 157 158 168 public abstract void 169 on_create (org.omg.Components.CCMObject ref); 170 171 176 public abstract void 177 on_add (org.omg.Components.CCMObject ref ); 178 179 184 public abstract void 185 on_remove (org.omg.Components.CCMObject ref); 186 187 191 public abstract void 192 on_destroy (); 193 } 194 195 196 197 | Popular Tags |