Package org.quartz

Examples of org.quartz.JobKey


    }

    @Override
    protected synchronized void _start() throws ParseException, SchedulerException {
        JobScheduler jobScheduler = (JobScheduler) ((Value) getJobSchedulerInjector()).getValue();
        jobScheduler.addComponentResolver(new JobKey(getName(), getGroup()), this.componentResolverInjector.getValue());
        super._start();
    }
View Full Code Here


    @Override
    protected synchronized void _start() throws ParseException, SchedulerException {
        waitForMSCServiceToStart();
        if (!isStarted()) {
            JobScheduler jobScheduler = (JobScheduler)((Value)getJobSchedulerInjector()).getValue();
            jobScheduler.addComponentResolver(new JobKey(getName(), getGroup()), this.componentResolverInjector.getValue());
            super._start();
        }
    }
View Full Code Here

    }

    @Override
    public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {

        JobKey sj = chainLinks.get(context.getJobDetail().getKey());

        if(sj == null) {
            return;
        }
View Full Code Here

    }
   
    public void scheduleJob(String jobName, String jobGroup,
            Map<String, Object> abstractTriggerInfo) throws Exception {
        try {
            JobKey jobKey = new JobKey(jobName, jobGroup);
            JobDetail jobDetail = scheduler.getJobDetail(jobKey);
            if(jobDetail == null) {
                throw new IllegalArgumentException("No such job '" + jobKey + "'");
            }
           
View Full Code Here

        }
    }

    public List<CompositeData> getTriggersOfJob(String jobName, String jobGroupName) throws Exception {
        try {
            JobKey jobKey = jobKey(jobName, jobGroupName);
            return TriggerSupport.toCompositeList(scheduler.getTriggersOfJob(jobKey));
        } catch (Exception e) {
            throw newPlainException(e);
        }
    }
View Full Code Here

    }

    public Date scheduleJob(String jobName, String jobGroup,
            String triggerName, String triggerGroup) throws Exception {
        try {
            JobKey jobKey = jobKey(jobName, jobGroup);
            JobDetail jobDetail = scheduler.getJobDetail(jobKey);
            if (jobDetail == null) {
                throw new IllegalArgumentException("No such job: " + jobKey);
            }
            TriggerKey triggerKey = triggerKey(triggerName, triggerGroup);
View Full Code Here

        trigger.setEndTime((Date) cData.get("endTime"));
        if(cData.containsKey("misfireInstruction")) {
            trigger.setMisfireInstruction(((Integer)cData.get("misfireInstruction")).intValue());
        }
        trigger.setKey(new TriggerKey((String) cData.get("name"), (String) cData.get("group")));
        trigger.setJobKey(new JobKey((String) cData.get("jobName"), (String) cData.get("jobGroup")));
    }
View Full Code Here

        }
        if(attrMap.containsKey("misfireInstruction")) {
            trigger.setMisfireInstruction(((Integer)attrMap.get("misfireInstruction")).intValue());
        }
        trigger.setKey(new TriggerKey((String) attrMap.get("name"), (String) attrMap.get("group")));
        trigger.setJobKey(new JobKey((String) attrMap.get("jobName"), (String) attrMap.get("jobGroup")));
    }
View Full Code Here

        Assert.state(initialized, "Scheduler is not yet initialized");
        EventMessage eventMessage = GenericEventMessage.asEventMessage(event);
        String jobIdentifier = JOB_NAME_PREFIX + eventMessage.getIdentifier();
        QuartzScheduleToken tr = new QuartzScheduleToken(jobIdentifier, groupIdentifier);
        try {
            JobDetail jobDetail = buildJobDetail(eventMessage, new JobKey(jobIdentifier, groupIdentifier));
            scheduler.scheduleJob(jobDetail, buildTrigger(triggerDateTime, jobDetail.getKey()));
        } catch (SchedulerException e) {
            throw new SchedulingException("An error occurred while setting a timer for a saga", e);
        }
        return tr;
View Full Code Here

   * 删除定时任务
   * @param jobName
   * @throws SchedulerException
   */
  public void deleteJob(String jobName) throws SchedulerException {
    quartzScheduler.deleteJob(new JobKey(jobName, Scheduler.DEFAULT_GROUP));
  }
View Full Code Here

TOP

Related Classes of org.quartz.JobKey

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.