org.huihoo.jfox.pool
Class ProxyObjectFactory
java.lang.Object
org.huihoo.jfox.pool.ObjectFactoryImpl
org.huihoo.jfox.pool.ProxyObjectFactory
- All Implemented Interfaces:
- ObjectFactory
- Direct Known Subclasses:
- ConnectionFactory
- public class ProxyObjectFactory
- extends ObjectFactoryImpl
|
Constructor Summary |
ProxyObjectFactory(java.lang.Class classType)
使用 PoolableObjectInvocationHandler 作为默认的 InvocationHandler |
ProxyObjectFactory(java.lang.Class classType,
java.lang.Class invokerClass)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
invokerClass
protected java.lang.Class invokerClass
ProxyObjectFactory
public ProxyObjectFactory(java.lang.Class classType)
throws java.lang.Exception
- 使用 PoolableObjectInvocationHandler 作为默认的 InvocationHandler
- Parameters:
classType - PoolableObject 的 Class
- Throws:
java.lang.Exception
ProxyObjectFactory
public ProxyObjectFactory(java.lang.Class classType,
java.lang.Class invokerClass)
throws java.lang.Exception
validateObject
public boolean validateObject(PoolableObject object)
- Description copied from interface:
ObjectFactory
- Ensures that the instance is safe to be returned by the pool
- Specified by:
validateObject in interface ObjectFactory- Overrides:
validateObject in class ObjectFactoryImpl
makeObject
public PoolableObject makeObject()
throws java.lang.Exception
- Description copied from interface:
ObjectFactory
- create a new poolable object
- Specified by:
makeObject in interface ObjectFactory- Overrides:
makeObject in class ObjectFactoryImpl
- Throws:
java.lang.Exception
destroyObject
public void destroyObject(PoolableObject object)
throws java.lang.Exception
- Description copied from class:
ObjectFactoryImpl
- destroy a poolabled object
- Specified by:
destroyObject in interface ObjectFactory- Overrides:
destroyObject in class ObjectFactoryImpl
- Parameters:
object -
- Throws:
java.lang.Exception