Sat May 25, 2013 11:25 pm
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
/**
* Quartz job implementation .
*/
public class QuartzJob implements Job {
private JobDetail jobDetail;
public QuartzJob() {
}
public void execute(JobExecutionContext arg0) throws JobExecutionException {
Object[] param = { arg0 };
jobDetail = arg0.getJobDetail();
if (jobDetail != null) {
JobDataMap jobDataMap = jobDetail.getJobDataMap();
if (jobDataMap != null) {
//job = (IJob) jobDataMap.get("JOB");
// job.execute();
} else {
// Do something
}
}
}
}
public interface IJob {
public void execute();
public void setName(String name);
public String getName();
public String getGroup();
public void setGroup(String group);
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.