|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PoolJobProcessor gets the job data to be processed from the job pool and
processes it. Along with the processing methods, it exposes some methods used
by management and monitoring clients.
public class MyPoolJobProcessor implements PoolJobProcessor { public ErrorCode processPool(JobContext jobContext, JobPool pool) { Object jobData=null; while((jobData=pool.getNextJobData())!=null) { // Perform the business logic on jobData } return ErrorCode.JOB_COMPLETED_SUCCESSFULLY; } // Implement all the other management and monitoring APIs. }
Method Summary | |
long |
getProcessedJobDataCount()
Returns the number of job data objects this particular job processor has finsihed. |
java.lang.Object |
getProcessorState()
Gets the processor to be displyed or anaylyzed for the monitoring purposes. |
ProcessorStatus |
getProcessorStatus()
Gets the processor status being used by the management clients. |
ErrorCode |
processPool(JobContext jobContext,
JobPool pool)
Process the job data available in the job pool until the job loader done loading of all the job data into the pool. |
boolean |
resume()
Resumes the pool job processor. |
boolean |
stop()
Stops the processor. |
boolean |
suspend()
Suspends the pool job processor. |
Method Detail |
public ErrorCode processPool(JobContext jobContext, JobPool pool)
Process the job data available in the job pool until the job loader done loading of all the job data into the pool. JobContext reference provides the access to many different resources in the framework. Return the final error code inditcating the status of this processor.
jobContext
- Context the job is being run.pool
- Reference to Job Pool.
public boolean suspend()
public boolean resume()
public boolean stop()
public java.lang.Object getProcessorState()
public ProcessorStatus getProcessorStatus()
public long getProcessedJobDataCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |