|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmonks.batch.framework.JobController
Job Controller is the important component, which actually creates and drives the execution of the job. This defines the logic and the flow, how the user components needs to be written and how they would be driven while executing the job. Framework provides two controllers called as BasicJobController and PoolJobController which defines their own way of executing the job.
JobController provides a factory method which returns the appropriate controller component based on the provided controller config object. This implements the management and monitoring interfaces to make sure all the controller implementations are manageable and monitorable.
Field Summary | |
protected JobContext |
jobContext
JobContext associated to this controller. |
Constructor Summary | |
JobController()
|
Method Summary | |
boolean |
changeLogLevel(java.lang.String loggerName,
org.apache.log4j.Level level)
Changes the log level for the requested logger name with the given log level. |
static JobController |
createJobController(JobContext jobContext,
Main controllerCreator)
This factory method creates required implementation of the controller based on the controller configuration available in job context and sets the job context to the controller. |
abstract JobStatistics |
getJobStatistics()
Returns the statistics of this job. |
org.apache.log4j.Level |
getLogLevel(java.lang.String loggerName)
Gets the log level of the given logger name. |
abstract ErrorCode |
process()
This method will be called by the Main to process the job. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jmonks.batch.framework.management.JobMonitorMBean |
getExpectedRecordsCount, getProcessedRecordsCount, getProcessorIDList, getProcessorState |
Methods inherited from interface org.jmonks.batch.framework.management.JobManagerMBean |
getProcessorStatus, resume, stop, suspend |
Field Detail |
protected JobContext jobContext
Constructor Detail |
public JobController()
Method Detail |
public static JobController createJobController(JobContext jobContext, Main controllerCreator)
This factory method creates required implementation of the controller based on the controller configuration available in job context and sets the job context to the controller.
jobContext
- Job context going to be associated with the controller.controllerCreator
- Main instance which is allowed to create the controller. This is to restrict only framework can instantiate the Controller.
java.lang.SecurityException
- If an attempt is made to create the controller by other than the Main class(framework).
ConfigurationException
- If required properties are missing in the controller configuration or the values are invalid.public org.apache.log4j.Level getLogLevel(java.lang.String loggerName)
getLogLevel
in interface JobManagerMBean
loggerName
- Name of the logger wants to find the log level.
public boolean changeLogLevel(java.lang.String loggerName, org.apache.log4j.Level level)
changeLogLevel
in interface JobManagerMBean
loggerName
- Logger name needs to be modified.level
- new logging level.
public abstract ErrorCode process()
public abstract JobStatistics getJobStatistics()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |