private void disposeCollection(Collection collection) { final Iterator i = collection.iterator(); while (i.hasNext()) { final Object o = i.next(); try { Disposable disposable = (Disposable) o; try { ((AbstractPoolable) o).setObjectPool(null); } catch (ClassCastException e) { // ignored } disposable.dispose(); } catch (ClassCastException e) { // ignored } } }
public void doActivateObject(Object o) { ((AbstractPoolable) o).setObjectPool(this); }