jfun.yan.factory
Class PooledFactory<T>

java.lang.Object
  extended by jfun.yan.factory.PooledFactory<T>
All Implemented Interfaces:
Factory<T>

public class PooledFactory<T>
extends java.lang.Object
implements Factory<T>

This class decorates a Factory object that uses a Pool strategy to cache the factory result;

Author:
Ben Yu Feb 2, 2006 11:57:12 AM

Constructor Summary
PooledFactory(Factory<T> factory, Pool<T> pool)
           
 
Method Summary
 T create()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PooledFactory

public PooledFactory(Factory<T> factory,
                     Pool<T> pool)
Method Detail

create

public T create()
Specified by:
create in interface Factory<T>