Package org.quartz

Examples of org.quartz.JobExecutionContext


/* 1871 */       groupName = "DEFAULT";
/*      */     }
/* 1873 */     List jobs = getCurrentlyExecutingJobs();
/* 1874 */     Iterator it = jobs.iterator();
/*      */
/* 1876 */     JobExecutionContext jec = null;
/* 1877 */     JobDetail jobDetail = null;
/* 1878 */     Job job = null;
/*      */
/* 1880 */     boolean interrupted = false;
/*      */
/* 1882 */     while (it.hasNext()) {
/* 1883 */       jec = (JobExecutionContext)it.next();
/* 1884 */       jobDetail = jec.getJobDetail();
/* 1885 */       if ((!jobName.equals(jobDetail.getName())) || (!groupName.equals(jobDetail.getGroup())))
/*      */         continue;
/* 1887 */       job = jec.getJobInstance();
/* 1888 */       if ((job instanceof InterruptableJob)) {
/* 1889 */         ((InterruptableJob)job).interrupt();
/* 1890 */         interrupted = true; continue;
/*      */       }
/* 1892 */       throw new UnableToInterruptJobException("Job '" + jobName + "' of group '" + groupName + "' can not be interrupted, since it does not implement " + InterruptableJob.class.getName());
View Full Code Here


    private  FixTasksExecutor fixtask=FixTasksExecutor.getInstance();

    public List <Map> fixAssetsInconsistencies() throws Exception
    {
      validateUser();
        JobExecutionContext arg0=null;
        fixtask.execute(arg0);
    List result=fixtask.getTasksresults();
     if(result.size()==0){
       result=null;
     }
View Full Code Here

 
    public void executeUpgrade() throws DotDataException, DotRuntimeException {
     

        FixTasksExecutor fixtask=FixTasksExecutor.getInstance();
          JobExecutionContext arg0=null;
          fixtask.execute(arg0);
     
  }
View Full Code Here

        }
       
        List jobs = getCurrentlyExecutingJobs();
        java.util.Iterator it = jobs.iterator();
       
        JobExecutionContext jec = null;
        JobDetail jobDetail = null;
        Job job = null;
       
        boolean interrupted = false;
       
        while (it.hasNext()) {
            jec = (JobExecutionContext)it.next();
            jobDetail = jec.getJobDetail();
            if (jobName.equals(jobDetail.getName())
                && groupName.equals(jobDetail.getGroup())){
                job = jec.getJobInstance();
                if (job instanceof InterruptableJob) {
                    ((InterruptableJob)job).interrupt();
                    interrupted = true;
                } else {
                    throw new UnableToInterruptJobException(
View Full Code Here

                    "An error occured instantiating job to be executed. job= '"
                            + jobDetail.getFullName() + "'", se);
            throw se;
        }

        this.jec = new JobExecutionContext(scheduler, firedBundle, job);
    }
View Full Code Here

        }
       
        List jobs = getCurrentlyExecutingJobs();
        java.util.Iterator it = jobs.iterator();
       
        JobExecutionContext jec = null;
        JobDetail jobDetail = null;
        Job job = null;
       
        boolean interrupted = false;
       
        while (it.hasNext()) {
            jec = (JobExecutionContext)it.next();
            jobDetail = jec.getJobDetail();
            if (jobName.equals(jobDetail.getName())
                && groupName.equals(jobDetail.getGroup())){
                job = jec.getJobInstance();
                if (job instanceof InterruptableJob) {
                    ((InterruptableJob)job).interrupt();
                    interrupted = true;
                } else {
                    throw new UnableToInterruptJobException(
View Full Code Here

                    "An error occured instantiating job to be executed. job= '"
                            + jobDetail.getFullName() + "'", se);
            throw se;
        }

        this.jec = new JobExecutionContext(scheduler, firedBundle, job);
    }
View Full Code Here

TOP

Related Classes of org.quartz.JobExecutionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.