01: package com.technoetic.xplanner.charts;
02:
03: import org.apache.log4j.Logger;
04: import org.quartz.JobExecutionContext;
05: import org.quartz.JobExecutionException;
06: import org.springframework.scheduling.quartz.QuartzJobBean;
07:
08: public class DataSamplingJob extends QuartzJobBean {
09: private DataSamplingCommand dataSamplingCommand;
10: public static final String GROUP = "xplanner";
11: public static final String NAME = "datasamplingJob";
12:
13: private final Logger LOG = Logger.getLogger(DataSamplingJob.class);
14:
15: public DataSamplingCommand getDataSamplingCommand() {
16: return dataSamplingCommand;
17: }
18:
19: public void setDataSamplingCommand(
20: DataSamplingCommand dataSamplingSupport) {
21: this .dataSamplingCommand = dataSamplingSupport;
22: }
23:
24: protected void executeInternal(JobExecutionContext context)
25: throws JobExecutionException {
26: LOG.info("generating data samples...");
27: dataSamplingCommand.execute();
28: LOG.info("generating data samples...Done");
29: }
30:
31: }
|