| java.lang.Object org.apache.turbine.services.pool.TurbinePool
TurbinePool | abstract public class TurbinePool (Code) | | This is a static accessor to common pooling tasks.
author: Ilkka Priha version: $Id: TurbinePool.java 534527 2007-05-02 16:10:59Z tv $ |
Method Summary | |
public static Object | getInstance(String className) Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
Parameters: className - the name of the class. | public static Object | getInstance(String className, ClassLoader loader) Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
The specified class loader will be passed to the Factory Service.
Parameters: className - the name of the class. Parameters: loader - the class loader. | public static Object | getInstance(String className, Object[] params, String[] signature) Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
Parameters for its constructor are given as an array of objects,
primitive types must be wrapped with a corresponding class.
Parameters: className - the name of the class. Parameters: loader - the class loader. Parameters: params - an array containing the parameters of the constructor. Parameters: signature - an array containing the signature of the constructor. | public static Object | getInstance(String className, ClassLoader loader, Object[] params, String[] signature) Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
Parameters for its constructor are given as an array of objects,
primitive types must be wrapped with a corresponding class.
The specified class loader will be passed to the Factory Service.
Parameters: className - the name of the class. Parameters: loader - the class loader. Parameters: params - an array containing the parameters of the constructor. Parameters: signature - an array containing the signature of the constructor. | public static Object | getInstance(Class clazz) Gets an instance of a specified class either from the pool
or by instatiating from the class if the pool is empty.
Parameters: clazz - the class. | public static Object | getInstance(Class clazz, Object params, String signature) Gets an instance of a specified class either from the pool
or by instatiating from the class if the pool is empty.
Parameters: clazz - the class. Parameters: params - an array containing the parameters of the constructor. Parameters: signature - an array containing the signature of the constructor. | public static PoolService | getService() Gets the pool service implementation. | public static boolean | putInstance(Object instance) Puts a used object back to the pool. |
getInstance | public static Object getInstance(String className) throws TurbineException(Code) | | Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
Parameters: className - the name of the class. the instance. throws: TurbineException - if recycling fails. |
getInstance | public static Object getInstance(String className, ClassLoader loader) throws TurbineException(Code) | | Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
The specified class loader will be passed to the Factory Service.
Parameters: className - the name of the class. Parameters: loader - the class loader. the instance. throws: TurbineException - if recycling fails. |
getInstance | public static Object getInstance(String className, Object[] params, String[] signature) throws TurbineException(Code) | | Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
Parameters for its constructor are given as an array of objects,
primitive types must be wrapped with a corresponding class.
Parameters: className - the name of the class. Parameters: loader - the class loader. Parameters: params - an array containing the parameters of the constructor. Parameters: signature - an array containing the signature of the constructor. the instance. throws: TurbineException - if recycling fails. |
getInstance | public static Object getInstance(String className, ClassLoader loader, Object[] params, String[] signature) throws TurbineException(Code) | | Gets an instance of a named class either from the pool
or by calling the Factory Service if the pool is empty.
Parameters for its constructor are given as an array of objects,
primitive types must be wrapped with a corresponding class.
The specified class loader will be passed to the Factory Service.
Parameters: className - the name of the class. Parameters: loader - the class loader. Parameters: params - an array containing the parameters of the constructor. Parameters: signature - an array containing the signature of the constructor. the instance. throws: TurbineException - if recycling fails. |
getInstance | public static Object getInstance(Class clazz) throws TurbineException(Code) | | Gets an instance of a specified class either from the pool
or by instatiating from the class if the pool is empty.
Parameters: clazz - the class. the instance. throws: TurbineException - if recycling fails. |
getInstance | public static Object getInstance(Class clazz, Object params, String signature) throws TurbineException(Code) | | Gets an instance of a specified class either from the pool
or by instatiating from the class if the pool is empty.
Parameters: clazz - the class. Parameters: params - an array containing the parameters of the constructor. Parameters: signature - an array containing the signature of the constructor. the instance. throws: TurbineException - if recycling fails. |
getService | public static PoolService getService()(Code) | | Gets the pool service implementation.
the pool service implementation. |
putInstance | public static boolean putInstance(Object instance)(Code) | | Puts a used object back to the pool. Objects implementing
the Recyclable interface can provide a recycle method to
be called when they are reused and a dispose method to be
called when they are returned to the pool.
Parameters: instance - the object instance to recycle. true if the instance was accepted. |
|
|