org.d_haven.mpool
Class ReflectionRecyclePolicy

java.lang.Object
  extended byorg.d_haven.mpool.ReflectionRecyclePolicy
All Implemented Interfaces:
RecyclePolicy

public class ReflectionRecyclePolicy
extends java.lang.Object
implements RecyclePolicy

The ReflectionRecyclePolicy allows the user to specify a particular method to use for recycling their pooled objects regardless of whether the object implements any interfaces or not.


Constructor Summary
ReflectionRecyclePolicy(java.lang.String methodName)
          Create the ReflectionRecyclePolicy using the supplied method name as the magic method that gets called when an object is returned to the pool.
 
Method Summary
 void recycle(java.lang.Object pooledObject)
          Recycle the object included.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReflectionRecyclePolicy

public ReflectionRecyclePolicy(java.lang.String methodName)
Create the ReflectionRecyclePolicy using the supplied method name as the magic method that gets called when an object is returned to the pool.

Parameters:
methodName - the name of the method to call
Method Detail

recycle

public void recycle(java.lang.Object pooledObject)
Recycle the object included. If the object is not supposed to recycle at all, then this method does nothing.

Specified by:
recycle in interface RecyclePolicy
Parameters:
pooledObject - the object to recycle

toString

public java.lang.String toString()


Copyright © 2004-2005 D-Haven.org. All Rights Reserved.