org.apache.turbine.util.pool
Interface Recyclable

All Known Subinterfaces:
ArrayCtorRecyclable, InitableRecyclable, TurbineRunData
All Known Implementing Classes:
DefaultCookieParser, DefaultParameterParser, DefaultTurbineRunData, IntakeTool, OMTool, RecyclableSupport

public interface Recyclable

An interface for objects that can be pooled and recycled several times by different clients.

Version:
$Id: Recyclable.java 534527 2007-05-02 16:10:59Z tv $
Author:
Ilkka Priha

Method Summary
 void dispose()
          Disposes the object after use.
 boolean isDisposed()
          Checks whether the recyclable has been disposed.
 void recycle()
          Recycles the object for a new client.
 

Method Detail

recycle

public void recycle()
Recycles the object for a new client. Recycle methods with parameters must be added to implementing object and they will be automatically called by pool implementations when the object is taken from the pool for a new client. The parameters must correspond to the parameters of the constructors of the object. For new objects, constructors can call their corresponding recycle methods whenever applicable. The recycle methods must call their super.


dispose

public void dispose()
Disposes the object after use. The method is called when the object is returned to its pool. The dispose method must call its super.


isDisposed

public boolean isDisposed()
Checks whether the recyclable has been disposed.

Returns:
true, if the recyclable is disposed.


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.