|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.util.factory.ConfigurableFactory
ConfigurableFactory is an abstract baseclass for OJB factory classes. It provides all infrastructure for configuration through OJB.properties. A derived class must implement the getConfigurationKey() method. The returned configuration key is used to lookup the class to be instantiated by the derived factory. The lookup is performed in the configure() method and uses the OJB.properties information.
Constructor Summary | |
ConfigurableFactory()
the public constructor calls configure() to perform configuration of the factory instance. |
Method Summary | |
protected java.lang.String |
buildArgumentString(java.lang.Class[] types,
java.lang.Object[] args)
|
void |
configure(Configuration pConfig)
configure an object using the Configuration pConfig |
java.lang.Object |
createNewInstance()
factory method for creating new instances the Class to be instantiated is defined by getClassToServe(). |
java.lang.Object |
createNewInstance(java.lang.Class[] types,
java.lang.Object[] args)
factory method for creating new instances the Class to be instantiated is defined by getClassToServe(). |
java.lang.Object |
createNewInstance(java.lang.Class type,
java.lang.Object arg)
factory method for creating new instances the Class to be instantiated is defined by getClassToServe(). |
java.lang.Class |
getClassToServe()
Returns the classToServe. |
protected abstract java.lang.String |
getConfigurationKey()
must be implemented in the concrete factory classes. |
protected Logger |
getLogger()
the logger for the ConfigurableFactory |
void |
setClassToServe(java.lang.Class classToServe)
Sets the classToServe. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConfigurableFactory()
Method Detail |
protected abstract java.lang.String getConfigurationKey()
public void configure(Configuration pConfig) throws ConfigurationException
Configurable
configure
in interface Configurable
pConfig
- the Configuration object used to configure current instance
ConfigurationException
looks up the the key getConfigurationKey() in the OjbConfiguration
to determine the Class to be served.
public java.lang.Object createNewInstance(java.lang.Class[] types, java.lang.Object[] args)
protected java.lang.String buildArgumentString(java.lang.Class[] types, java.lang.Object[] args)
public java.lang.Object createNewInstance()
public java.lang.Object createNewInstance(java.lang.Class type, java.lang.Object arg)
public java.lang.Class getClassToServe()
public void setClassToServe(java.lang.Class classToServe)
getConfigurationKey()
.
classToServe
- The classToServe to setprotected Logger getLogger()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |