org.frameworkset.task.DefaultScheduleService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bboss-schedule Show documentation
Show all versions of bboss-schedule Show documentation
bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com
package org.frameworkset.task;
import java.io.Serializable;
import org.quartz.Scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* 缺省的任务调度器
* Title: DefaultScheduleService.java
* Description:
* bboss workgroup
* Copyright (c) 2007
* @Date 2010-3-26 下午02:03:35
* @author biaoping.yin,gao.tang
* @version 1.0
*/
public class DefaultScheduleService extends ScheduleService implements Serializable{
private static Logger log = LoggerFactory.getLogger(DefaultScheduleService.class);
public void startService(Scheduler scheduler)
throws ScheduleServiceException {
}
public void startExecuteJob(Scheduler scheduler, SchedulejobInfo jobInfo) {
if(!jobInfo.isUsed())
return ;
try
{
if(!jobInfo.isMethodInvokerJob())
{
installExecuteJob(scheduler,jobInfo);
}
else
{
installMethodInvokerJob(scheduler,jobInfo);
}
}
catch (Exception ex) {
log.error(ex.getMessage(),ex);
}
}
public void updateJob(Scheduler scheduler, SchedulejobInfo jobInfo) {
// TODO Auto-generated method stub
}
public void updateTriger(Scheduler scheduler, SchedulejobInfo jobInfo) {
}
public void updateJobAndTriger(Scheduler scheduler, SchedulejobInfo jobInfo) {
this.taskservice.deleteJob(jobInfo.getId(),jobInfo.getParent().getId());
startExecuteJob( scheduler, jobInfo) ;
}
}