Package org.quartz

Examples of org.quartz.Job


    }

    @Override
    public Job newJob(TriggerFiredBundle bundle, Scheduler scheduler) throws SchedulerException
    {
        Job result = null;
        try
        {
            Class<? extends Job> jobClass = bundle.getJobDetail().getJobClass();
            result = BeanProvider.getContextualReference(jobClass);
            scheduler.getContext().put(jobClass.getName(), Boolean.TRUE);
View Full Code Here


    public void registerJob(final Task task, final String jobClassName, final String cronExpression)
            throws ClassNotFoundException, SchedulerException, ParseException {

        Class jobClass = Class.forName(jobClassName);
        Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
                createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        if (jobInstance instanceof AbstractTaskJob) {
            ((AbstractTaskJob) jobInstance).setTaskId(task.getId());
        }
        if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
View Full Code Here

        registerJob(getJobName(task), jobInstance, cronExpression);
    }

    public void registerJob(final Report report) throws SchedulerException, ParseException {
        Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
                createBean(ReportJob.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        ((ReportJob) jobInstance).setReportId(report.getId());

        registerJob(getJobName(report), jobInstance, report.getCronExpression());
    }
View Full Code Here

      {
         List jobs = getAllExcutingJobs();
         for (Object object : jobs)
         {
            JobExecutionContext ctx = (JobExecutionContext)object;
            Job job = ctx.getJobInstance();
            if (job instanceof InterruptableJob)
            {
               ((InterruptableJob)job).interrupt();
            }
         }
View Full Code Here

      {
         List jobs = getAllExcutingJobs();
         for (Object object : jobs)
         {
            JobExecutionContext ctx = (JobExecutionContext)object;
            Job job = ctx.getJobInstance();
            if (job instanceof InterruptableJob)
            {
               ((InterruptableJob)job).interrupt();
            }
         }
View Full Code Here

      try
      {
         List<JobExecutionContext> jobs = getAllExcutingJobs();
         for (JobExecutionContext ctx : jobs)
         {
            Job job = ctx.getJobInstance();
            if (job instanceof InterruptableJob)
            {
               ((InterruptableJob)job).interrupt();
            }
         }
View Full Code Here

    }

    public void registerJob(final Task task, final String jobClassName, final String cronExpression) throws Exception {

        Class jobClass = Class.forName(jobClassName);
        Job jobInstance = (Job) getBeanFactory().createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        if (jobInstance instanceof AbstractTaskJob) {
            ((AbstractTaskJob) jobInstance).setTaskId(task.getId());
        }
        if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
            String jobActionsClassName = ((SyncTask) task).getJobActionsClassName();
View Full Code Here

        registerJob(getJobName(task), jobInstance, cronExpression);
    }

    public void registerJob(final Report report) throws Exception {

        Job jobInstance = (Job) getBeanFactory().createBean(ReportJob.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE,
                false);
        ((ReportJob) jobInstance).setReportId(report.getId());

        registerJob(getJobName(report), jobInstance, report.getCronExpression());
    }
View Full Code Here

      {
         List jobs = getAllExcutingJobs();
         for (Object object : jobs)
         {
            JobExecutionContext ctx = (JobExecutionContext)object;
            Job job = ctx.getJobInstance();
            if (job instanceof InterruptableJob)
            {
               ((InterruptableJob)job).interrupt();
            }
         }
View Full Code Here

      try
      {
         List<JobExecutionContext> jobs = getAllExcutingJobs();
         for (JobExecutionContext ctx : jobs)
         {
            Job job = ctx.getJobInstance();
            if (job instanceof InterruptableJob)
            {
               ((InterruptableJob)job).interrupt();
            }
         }
View Full Code Here

TOP

Related Classes of org.quartz.Job

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.