org.apache.turbine.util.pool
Class RecyclableSupport

java.lang.Object
  |
  +--org.apache.turbine.util.pool.RecyclableSupport
All Implemented Interfaces:
Recyclable
Direct Known Subclasses:
BaseValueParser, DefaultTurbineRunData

public class RecyclableSupport
extends java.lang.Object
implements Recyclable

A support class for recyclable objects implementing default methods.

Version:
$Id: RecyclableSupport.java,v 1.1.1.1 2001/08/16 05:09:59 jvanzyl Exp $
Author:
Ilkka Priha

Field Summary
private  boolean disposed
          The disposed flag.
 
Constructor Summary
RecyclableSupport()
           
 
Method Summary
 void dispose()
          Disposes the object by setting its disposed flag.
protected  boolean doDispose()
          A convenience method allowing a clever recyclable object to put itself into a pool for recycling.
 boolean isDisposed()
          Checks whether the object is disposed.
 void Recyclable()
          Constructs a new recyclable support and calls the default recycle method.
 void recycle()
          Recycles the object by removing its disposed flag.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

disposed

private boolean disposed
The disposed flag.
Constructor Detail

RecyclableSupport

public RecyclableSupport()
Method Detail

Recyclable

public void Recyclable()
Constructs a new recyclable support and calls the default recycle method.

recycle

public void recycle()
Recycles the object by removing its disposed flag.
Specified by:
recycle in interface Recyclable

dispose

public void dispose()
Disposes the object by setting its disposed flag.
Specified by:
dispose in interface Recyclable

isDisposed

public boolean isDisposed()
Checks whether the object is disposed.
Specified by:
isDisposed in interface Recyclable
Returns:
true, if the object is disposed.

doDispose

protected boolean doDispose()
A convenience method allowing a clever recyclable object to put itself into a pool for recycling.
Returns:
true, if disposal was accepted by the pool.


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