1 package org.jacorb.notification.util; 2 3 23 24 import org.apache.avalon.framework.logger.Logger; 25 import org.jacorb.notification.interfaces.Disposable; 26 27 33 34 public abstract class AbstractPoolable implements Disposable 35 { 36 private AbstractObjectPool objectPool_; 37 38 protected final Logger logger_ = LogUtil.getLogger(getClass().getName()); 39 40 41 46 public void dispose() 47 { 48 if (objectPool_ != null) 49 { 50 objectPool_.returnObject(this); 51 52 setObjectPool(null); 53 } 54 } 55 56 59 public synchronized void setObjectPool(AbstractObjectPool pool) 60 { 61 objectPool_ = pool; 62 } 63 64 68 public abstract void reset(); 69 } | Popular Tags |