| java.lang.Object org.griphyn.cPlanner.poolinfo.PoolMode
PoolMode | public class PoolMode (Code) | | This class determines at runtime which
implementing class to use as a Pool Handle.
It uses the reflection package of java
to dynamically load a class. The class
to be loaded is specified by the
vds.pool.mode property.
author: Karan Vahi author: Gaurang Mehta version: $Revision: 50 $ |
Method Summary | |
public static String | getImplementingClass(String readMode) Given a string readMode returns the
name of the class that implements
that read mode. | public static String | getMethodName(int lMode) Its returns the name of the method that needs to be invoked
to get the object of the implementing pool class. | public static int | getValue(String readMode) given a string Mode returns the
corresponding int value
Parameters: readMode - The String form of theread mode the corresponding int valueof the mode. | public static PoolInfoProvider | loadPoolInstance(String poolClass, String poolProvider, int lMode) Loads the pool info provider class using the reflection package
in java at runtime. | public static PoolInfoProvider | loadPoolInstance(String poolClass, String poolProvider, String propFileName, int lMode) Loads the pool info provider class using the reflection package
in java at runtime. |
MULTIPLE_READ | final public static String MULTIPLE_READ(Code) | | Constants for multiple read.
|
NON_SINGLETON_LOAD | final public static int NON_SINGLETON_LOAD(Code) | | |
SINGLETON_LOAD | final public static int SINGLETON_LOAD(Code) | | Constants to specify how to load the
class, as singleton or non singleton.
|
SINGLE_READ | final public static String SINGLE_READ(Code) | | Constants for single read.
|
TEXT_READ_CLASS | final public static String TEXT_READ_CLASS(Code) | | |
TEXT_READ_VALUE | final public static int TEXT_READ_VALUE(Code) | | Constants for multiline text pool read.
|
UNDEFINED_READ_VALUE | final public static int UNDEFINED_READ_VALUE(Code) | | Constants for mode not defined.
|
XML_READ_CLASS | final public static String XML_READ_CLASS(Code) | | |
XML_READ_VALUE | final public static int XML_READ_VALUE(Code) | | Constants for xml pool read.
|
getImplementingClass | public static String getImplementingClass(String readMode)(Code) | | Given a string readMode returns the
name of the class that implements
that read mode. If the readMode
doesnt equal any of the predefined
constants then the value of readMode
is taken as the name of the implementing class.
Parameters: readMode - The String form of theread mode, got from the propertyvds.pool.mode. the corresponding int valueof the mode. If not foundthen null |
getMethodName | public static String getMethodName(int lMode)(Code) | | Its returns the name of the method that needs to be invoked
to get the object of the implementing pool class. It determines
the method name on the basis of the value of the loading mode
specified.
Parameters: lMode - the loading mode of the class. It specifies whetherthe singleton object of the class needs to beloaded or the non singleton instance. the name of the method that needs to be invoked. |
getValue | public static int getValue(String readMode)(Code) | | given a string Mode returns the
corresponding int value
Parameters: readMode - The String form of theread mode the corresponding int valueof the mode. If not foundthen null |
loadPoolInstance | public static PoolInfoProvider loadPoolInstance(String poolClass, String poolProvider, int lMode)(Code) | | Loads the pool info provider class using the reflection package
in java at runtime. The class is loaded as a singleton or
a non-singleton dependant on the parameter passed. The properties
file that is picked up is the default properties file from
$PEGASUS_HOME/etc directory.
Parameters: poolClass - the name of the class that resides in thepackage named PoolMode.PACKAGE_NAME or thecomplete name of the class including thepackage name. Parameters: poolProvider - the path to the file, that contains thepool configuration in the appropriate formatthat the implementing poolClass understands. Parameters: lMode - the loading mode of the class. It specifies whetherthe singleton object of the class needs to beloaded or the non singleton instance. the object corresponding to the pool info provider class. |
loadPoolInstance | public static PoolInfoProvider loadPoolInstance(String poolClass, String poolProvider, String propFileName, int lMode)(Code) | | Loads the pool info provider class using the reflection package
in java at runtime. The class is loaded as a singleton or
a non-singleton dependant on the parameter passed.
Parameters: poolClass - the name of the class that resides in thepackage named PoolMode.PACKAGE_NAME or thecomplete name of the class including thepackage name. Parameters: poolProvider - the path to the file, that contains thepool configuration in the appropriate formatthat the implementing poolClass understands. Parameters: propFileName - name of the properties file to picked from$PEGASUS_HOME/etc/ directory. For the singletonloading only the default file is picked up. Parameters: lMode - the loading mode of the class. It specifies whetherthe singleton object of the class needs to beloaded or the non singleton instance. the object corresponding to the pool info provider class. |
|
|