Package org.quartz

Examples of org.quartz.TriggerKey


        Map<String, Object> triggerParameters = IntrospectionSupport.extractProperties(parameters, "trigger.");
        Map<String, Object> jobParameters = IntrospectionSupport.extractProperties(parameters, "job.");

        // Create quartz endpoint
        QuartzEndpoint result = new QuartzEndpoint(uri, this);
        TriggerKey triggerKey = createTriggerKey(uri, remaining, result);
        result.setTriggerKey(triggerKey);
        result.setTriggerParameters(triggerParameters);
        result.setJobParameters(jobParameters);
        return result;
    }
View Full Code Here


        if (prefixJobNameWithEndpointId) {
            name = endpoint.getId() + "_" + name;
        }

        return new TriggerKey(name, group);
    }
View Full Code Here

    private void setExecTime(final SchedTaskTO taskTO, final Task task) {
        String triggerName = JobInstanceLoader.getTriggerName(JobInstanceLoader.getJobName(task));

        Trigger trigger = null;
        try {
            trigger = scheduler.getScheduler().getTrigger(new TriggerKey(triggerName, Scheduler.DEFAULT_GROUP));
        } catch (SchedulerException e) {
            LOG.warn("While trying to get to " + triggerName, e);
        }

        if (trigger != null) {
View Full Code Here

    OperResult result = new OperResult();
    if(SchedulerProvider.scheduler==null){
      result.setFailed(SCHEDULER_IS_NULL);
    }else{
      try {
        TriggerKey tk = GetObjectString.string2TriggerKey(triggerKey);
        System.out.println("stoping trigger:"+tk);
        SchedulerProvider.scheduler.unscheduleJob(tk);
        result.setSucceed();
      } catch (SchedulerException e) {
        // TODO Auto-generated catch block
View Full Code Here

        result.setFailed(SCHEDULER_IS_NULL);
      }else{
        try {
          List<LazyDynaBean> beans = new ArrayList<LazyDynaBean>();
          for(Trigger trigger:SchedulerProvider.scheduler.getTriggersOfJob(GetObjectString.string2JobKey(taskinfo.getId()))){
            TriggerKey triggerKey = trigger.getKey();
            LazyDynaBean bean = new LazyDynaBean();
            bean.set("triggerKey", triggerKey.toString());
            bean.set("name", triggerKey.getName());
            bean.set("group", triggerKey.getGroup());
            bean.set("description", trigger.getDescription());
            bean.set("previousFireTime", trigger.getPreviousFireTime());
            bean.set("nextFireTime", trigger.getNextFireTime());
            TriggerState trigState = SchedulerProvider.scheduler.getTriggerState(triggerKey);
            bean.set("trigState", trigState);
View Full Code Here

    OperResult result = new OperResult();
    if(SchedulerProvider.scheduler==null){
      result.setFailed(SCHEDULER_IS_NULL);
    }else{
      try {
        TriggerKey tk = GetObjectString.string2TriggerKey(triggerKey);
        System.out.println("stoping trigger:"+tk);
        SchedulerProvider.scheduler.unscheduleJob(tk);
        result.setSucceed();
      } catch (SchedulerException e) {
        // TODO Auto-generated catch block
View Full Code Here

        result.setFailed(SCHEDULER_IS_NULL);
      }else{
        try {
          List<LazyDynaBean> beans = new ArrayList<LazyDynaBean>();
          for(Trigger trigger:SchedulerProvider.scheduler.getTriggersOfJob(GetObjectString.string2JobKey(taskinfo.getId()))){
            TriggerKey triggerKey = trigger.getKey();
            LazyDynaBean bean = new LazyDynaBean();
            bean.set("triggerKey", triggerKey.toString());
            bean.set("name", triggerKey.getName());
            bean.set("group", triggerKey.getGroup());
            bean.set("description", trigger.getDescription());
            bean.set("previousFireTime", trigger.getPreviousFireTime());
            bean.set("nextFireTime", trigger.getNextFireTime());
            TriggerState trigState = SchedulerProvider.scheduler.getTriggerState(triggerKey);
            bean.set("trigState", trigState);
View Full Code Here

    OperResult result = new OperResult();
    if(SchedulerProvider.scheduler==null){
      result.setFailed(SCHEDULER_IS_NULL);
    }else{
      try {
        TriggerKey tk = GetObjectString.string2TriggerKey(triggerKey);
        System.out.println("stoping trigger:"+tk);
        SchedulerProvider.scheduler.unscheduleJob(tk);
        result.setSucceed();
      } catch (SchedulerException e) {
        // TODO Auto-generated catch block
View Full Code Here

        result.setFailed(SCHEDULER_IS_NULL);
      }else{
        try {
          List<LazyDynaBean> beans = new ArrayList<LazyDynaBean>();
          for(Trigger trigger:SchedulerProvider.scheduler.getTriggersOfJob(GetObjectString.string2JobKey(taskinfo.getId()))){
            TriggerKey triggerKey = trigger.getKey();
            LazyDynaBean bean = ObjectListConvert2DynaBeanList.convert(trigger);
            bean.set("triggerKey", triggerKey.toString());
            if(trigger instanceof CronTrigger){
              CronTrigger cronTrigger = (CronTrigger)trigger;
              bean.set("cronExpression", StringUtils.trim(cronTrigger.getCronExpression()));
            }
//            if(bean.get("cronExpression")!=null){
View Full Code Here

    OperResult result = new OperResult();
    if(SchedulerProvider.scheduler==null){
      result.setFailed(SCHEDULER_IS_NULL);
    }else{
      try {
        TriggerKey tk = GetObjectString.string2TriggerKey(triggerKey);
        System.out.println("stoping trigger:"+tk);
        SchedulerProvider.scheduler.unscheduleJob(tk);
        result.setSucceed();
      } catch (SchedulerException e) {
        // TODO Auto-generated catch block
View Full Code Here

TOP

Related Classes of org.quartz.TriggerKey

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.