public class PoolMode extends Object
Modifier and Type | Field and Description |
---|---|
private static LogManager |
mLogger |
static String |
MULTIPLE_READ
Constants for multiple read.
|
static int |
NON_SINGLETON_LOAD |
static String |
PACKAGE_NAME |
static String |
SINGLE_READ
Constants for single read.
|
static int |
SINGLETON_LOAD
Constants to specify how to load the
class, as singleton or non singleton.
|
static String |
TEXT_READ_CLASS |
static int |
TEXT_READ_VALUE
Constants for multiline text pool read.
|
static int |
UNDEFINED_READ_VALUE
Constants for mode not defined.
|
static String |
XML_READ_CLASS |
static int |
XML_READ_VALUE
Constants for xml pool read.
|
Constructor and Description |
---|
PoolMode() |
Modifier and Type | Method and Description |
---|---|
static String |
getImplementingClass(String readMode)
Given a string readMode returns the
name of the class that implements
that read mode.
|
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.
|
static int |
getValue(String readMode)
Deprecated.
|
private static PoolInfoProvider |
loadPoolInstance(String poolClass,
int lMode,
Object[] argList)
Loads the appropriate class that implements a particular
pool mode using the reflection package in java at runtime.
|
static PoolInfoProvider |
loadPoolInstance(String poolClass,
String poolProvider,
int lMode)
Loads the pool info provider class using the reflection package
in java at runtime.
|
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.
|
public static final int SINGLETON_LOAD
public static final int NON_SINGLETON_LOAD
public static final String SINGLE_READ
public static final String MULTIPLE_READ
public static final int XML_READ_VALUE
public static final String XML_READ_CLASS
public static final int TEXT_READ_VALUE
public static final String TEXT_READ_CLASS
public static final int UNDEFINED_READ_VALUE
public static final String PACKAGE_NAME
private static LogManager mLogger
public static String getImplementingClass(String readMode)
readMode
- The String form of the
read mode, got from the property
vds.pool.mode.public static PoolInfoProvider loadPoolInstance(String poolClass, String poolProvider, int lMode)
poolClass
- the name of the class that resides in the
package named PoolMode.PACKAGE_NAME or the
complete name of the class including the
package name.poolProvider
- the path to the file, that contains the
pool configuration in the appropriate format
that the implementing poolClass understands.lMode
- the loading mode of the class. It specifies whether
the singleton object of the class needs to be
loaded or the non singleton instance.public static PoolInfoProvider loadPoolInstance(String poolClass, String poolProvider, String propFileName, int lMode)
poolClass
- the name of the class that resides in the
package named PoolMode.PACKAGE_NAME or the
complete name of the class including the
package name.poolProvider
- the path to the file, that contains the
pool configuration in the appropriate format
that the implementing poolClass understands.propFileName
- name of the properties file to picked from
$PEGASUS_HOME/etc/ directory. For the singleton
loading only the default file is picked up.lMode
- the loading mode of the class. It specifies whether
the singleton object of the class needs to be
loaded or the non singleton instance.public static String getMethodName(int lMode)
lMode
- the loading mode of the class. It specifies whether
the singleton object of the class needs to be
loaded or the non singleton instance.private static PoolInfoProvider loadPoolInstance(String poolClass, int lMode, Object[] argList) throws FactoryException
poolClass
- StringlMode
- the loading mode of the class. It specifies whether
the singleton object of the class needs to be
loaded or the non singleton instance.argList
- Object[]FactoryException
- that nests any error that
might occur during the instantiation of the implementation.public static int getValue(String readMode)
readMode
- The String form of the
read mode