Class BasePoolableObjectFactory<T>

  • Type Parameters:
    T - the type of objects held in this pool
    All Implemented Interfaces:
    PoolableObjectFactory<T>

    public abstract class BasePoolableObjectFactory<T>
    extends java.lang.Object
    implements PoolableObjectFactory<T>
    A base implementation of PoolableObjectFactory.

    All operations defined here are essentially no-op's.

    Since:
    Pool 1.0
    Version:
    $Revision: 1222388 $ $Date: 2011-12-22 13:28:27 -0500 (Thu, 22 Dec 2011) $
    See Also:
    PoolableObjectFactory, BaseKeyedPoolableObjectFactory
    • Constructor Detail

      • BasePoolableObjectFactory

        public BasePoolableObjectFactory()
    • Method Detail

      • makeObject

        public abstract T makeObject()
                              throws java.lang.Exception
        Creates an instance that can be served by the pool. Instances returned from this method should be in the same state as if they had been activated. They will not be activated before being served by the pool.
        Specified by:
        makeObject in interface PoolableObjectFactory<T>
        Returns:
        an instance that can be served by the pool.
        Throws:
        java.lang.Exception - if there is a problem creating a new instance, this will be propagated to the code requesting an object.
      • validateObject

        public boolean validateObject​(T obj)
        This implementation always returns true.
        Specified by:
        validateObject in interface PoolableObjectFactory<T>
        Parameters:
        obj - ignored
        Returns:
        true