|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmonks.batch.framework.config.JobConfigFactory org.jmonks.batch.framework.config.xml.XMLJobConfigFactory
XMLJobConfigFactory reads the job configuration from XML file to create the configuration objects needed by the job. This factory looks for few properties in the factory config properties map to identify the source of the XML file. The source of the XML file can be defined as absolute path on the file system or resource on the class path.
Following are the two properties, this factory looks to find the source. If it find these two it will give priority to the physical absolute path location.
property key | property value |
job-config-file-absolute-location | /batchserver/config/batch-config.xml |
job-config-file-classpath-location | batch-config.xml |
Constructor Summary | |
XMLJobConfigFactory()
Do not use this constructor to instantiate XMLJobConfigFactory directly. |
Method Summary | |
JobConfig |
getJobConfig(java.lang.String jobName)
Returns the requested job configuration as JobConfig object. |
protected void |
init(java.util.Map configFactoryProps)
This method initializes the factory by accepting the required properties from the input map. |
java.lang.String |
toString()
Returns the string representation of XMLJobConfigFactory class in the format {XMLJobConfigFactory [configProperties = value] [element = value]} |
Methods inherited from class org.jmonks.batch.framework.config.JobConfigFactory |
getJobConfigFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public XMLJobConfigFactory()
Do not use this constructor to instantiate XMLJobConfigFactory directly. Use the factory method getJobConfigFactory in JobConfigFactory class to get the config factory instance. This constructor has been provided to make sure this should be instantiable and accessible to the JobConfigFactory class.
Method Detail |
protected void init(java.util.Map configFactoryProps)
init
in class JobConfigFactory
configFactoryProps
- Map consists of all the properties defined for this factory.
ConfigurationException
- If required properties are missing.public JobConfig getJobConfig(java.lang.String jobName)
getJobConfig
in class JobConfigFactory
jobName
- Name of the job.
java.lang.IllegalArgumentException
- If jobName passed as parameter is null.
java.lang.IllegalStateException
- If factory is not initialized properly.public java.lang.String toString()
Returns the string representation of XMLJobConfigFactory class in the format
{XMLJobConfigFactory [configProperties = value] [element = value]}
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |