org.huihoo.jfox.pool
Class ObjectFactorySupport
java.lang.Object
|
+--org.huihoo.jfox.pool.ObjectFactorySupport
- All Implemented Interfaces:
- ObjectFactory
- Direct Known Subclasses:
- ProxyObjectFactory, ThreadableObjectFactory
- public class ObjectFactorySupport
- extends java.lang.Object
- implements ObjectFactory
- Author:
- Young Yang
|
Field Summary |
protected java.lang.Class |
classType
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
classType
protected java.lang.Class classType
ObjectFactorySupport
public ObjectFactorySupport(java.lang.Class classType)
throws java.lang.Exception
ObjectFactorySupport
public ObjectFactorySupport(java.lang.String className)
throws java.lang.Exception
getObjectClass
public java.lang.Class getObjectClass()
- Specified by:
getObjectClass in interface ObjectFactory
makeObject
public PoolableObject makeObject()
throws java.lang.Exception
- Description copied from interface:
ObjectFactory
- create a new poolable object
- Specified by:
makeObject in interface ObjectFactory
- Following copied from interface:
org.huihoo.jfox.pool.ObjectFactory
- Returns:
-
destroyObject
public void destroyObject(PoolableObject object)
throws java.lang.Exception
- destroy a poolabled object
- Specified by:
destroyObject in interface ObjectFactory
- Parameters:
object -
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
- Following copied from interface:
org.huihoo.jfox.pool.ObjectFactory
- Parameters:
object - - Returns:
-
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object