org.apache.tapestry.util.pool
Interface IPoolable

All Known Implementing Classes:
AbstractSpecificationResolver, Default

public interface IPoolable

Marks an object as being aware that is to be stored into a Pool. This gives the object a last chance to reset any state.

Since:
1.0.4
Version:
$Id: IPoolable.java,v 1.3 2004/02/19 17:37:40 hlship Exp $
Author:
Howard Lewis Ship

Method Summary
 void discardFromPool()
          Invoked just as a Pool discards an object (for lack of use).
 void resetForPool()
          Invoked by a Pool just before the object is added to the pool.
 

Method Detail

resetForPool

public void resetForPool()
Invoked by a Pool just before the object is added to the pool. The object should return its state to how it was when freshly instantiated (or at least, its state should be indistinguishable from a freshly instantiated instance).


discardFromPool

public void discardFromPool()
Invoked just as a Pool discards an object (for lack of use). This allows a last chance to perform final cleanup on the object while it is still referencable.