org.huihoo.jfox.pool
Class ProxyObjectFactory
java.lang.Object
|
+--org.huihoo.jfox.pool.ObjectFactorySupport
|
+--org.huihoo.jfox.pool.ProxyObjectFactory
- All Implemented Interfaces:
- ObjectFactory
- Direct Known Subclasses:
- ConnectionFactory
- public class ProxyObjectFactory
- extends ObjectFactorySupport
- Author:
- Young Yang
|
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
- Overrides:
validateObject in class ObjectFactorySupport
- Following copied from interface:
org.huihoo.jfox.pool.ObjectFactory
- Parameters:
object - - Returns:
-
makeObject
public PoolableObject makeObject()
throws java.lang.Exception
- Description copied from interface:
ObjectFactory
- create a new poolable object
- Overrides:
makeObject in class ObjectFactorySupport
- Following copied from interface:
org.huihoo.jfox.pool.ObjectFactory
- Returns:
-
destroyObject
public void destroyObject(PoolableObject object)
throws java.lang.Exception
- Description copied from class:
ObjectFactorySupport
- destroy a poolabled object
- Overrides:
destroyObject in class ObjectFactorySupport
- Following copied from class:
org.huihoo.jfox.pool.ObjectFactorySupport
- Parameters:
object -