[Batchserver-cvs] batchserver/src/org/jmonks/batchserver/framework/controller JobController.java,
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-09-14 23:05:18
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/controller In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10680/controller Modified Files: JobController.java Log Message: no message Index: JobController.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/controller/JobController.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** JobController.java 13 Sep 2006 23:29:45 -0000 1.12 --- JobController.java 14 Sep 2006 23:05:12 -0000 1.13 *************** *** 12,22 **** /** * <p> ! * Job Controller is the important component, which actually creates and starts ! * the proper components to process the job. Controller can defines its own ! * logic (architecture) to process the jobs. This creates and manages the complete ! * architecture it defines to process the job. * </p> * <p> ! * This 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 --- 12,24 ---- /** * <p> ! * 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. * </p> + * * <p> ! * 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 *************** *** 31,35 **** { /** ! * Name of the job this controller belongs to. */ protected JobContext jobContext=null; --- 33,37 ---- { /** ! * JobContext associated to this controller. */ protected JobContext jobContext=null; *************** *** 43,63 **** * <p> * This factory method loads the required implementation of the controller ! * based on the controller configuration received. First it tries to look for the ! * existence of controller with this jobName in repository (If job is stopped ! * in middle through job management agent using restart=true flag, ! * this controller will be stopped and persisted in the repository). ! * By default, if job is stopped in the middle it will be restarted. ! * To override this behaviour special property needs to be sent as ! * "job-controller-restart=false" in the additional configuration. ! * If it is false, it calls the releaseController method on repository to ! * clear its current state and create a new controller using the configuration ! * defined in controllerConfig. * </p> ! * @param jobName Name of the job to be started. ! * @param controllerConfig configuration object represents controller configuration. * ! * @return Returns the correct implementation of the controller. */ ! public static synchronized JobController getJobController(JobContext jobContext) { logger.trace("Entering getJobController = " + jobContext.getJobName()); --- 45,57 ---- * <p> * This factory method loads the required implementation of the controller ! * based on the controller configuration available in job context and sets ! * this context to the controller. * </p> ! * ! * @param jobContext Job context going to be associated with the controller. * ! * @return Returns the defined implementation of the controller. */ ! public static JobController getJobController(JobContext jobContext) { logger.trace("Entering getJobController = " + jobContext.getJobName()); *************** *** 99,110 **** /** - * Gets the job context. - */ - public JobContext getJobContext() - { - return this.jobContext; - } - - /** * Gets the log level of the given logger name. * --- 93,96 ---- *************** *** 132,144 **** /** ! * This method will be called by Main to process the job. ! * This returns the exit status of the job, which will be communicate to everyone. * ! * @return Returns the exit status of the job. */ public abstract ErrorCode process(); /** ! * Returns the statistics of this job. Statistics should be queried only * after the completion of controller processing. Querying before the completion * of processing always returns null. --- 118,130 ---- /** ! * This method will be called by the Main to process the job. This returns the ! * ErrorCode explaining whether the process has been failed or succeeded. * ! * @return Returns the ErrorCode as exit status of the job. */ public abstract ErrorCode process(); /** ! * Returns the statistics of this job. Statistics will be queried only * after the completion of controller processing. Querying before the completion * of processing always returns null. |