Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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`

Constructor Summary
`ObjectFactorySupport(java.lang.Class classType)`
`ObjectFactorySupport(java.lang.String className)`

Method Summary
`void` | `destroyObject(PoolableObject object)` destroy a poolabled object
`boolean` | `equals(java.lang.Object obj)`
`java.lang.Class` | `getObjectClass()`
`int` | `hashCode()`
`PoolableObject` | `makeObject()` create a new poolable object
`boolean` | `validateObject(PoolableObject object)` Ensures that the instance is safe to be returned by the pool

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### classType

    protected java.lang.Class classType

Constructor Detail

### ObjectFactorySupport

    public ObjectFactorySupport(java.lang.Class classType)
                         throws java.lang.Exception

### ObjectFactorySupport

    public ObjectFactorySupport(java.lang.String className)
                         throws java.lang.Exception

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD