Package com.quartz.monitor.object

Examples of com.quartz.monitor.object.Scheduler


    List<Scheduler> list = quartzInstance.getSchedulerList();
    if (list != null && list.size() > 0)
        {
           for (int i = 0; i < list.size(); i++)
           {
              Scheduler s = (Scheduler) list.get(i);
              if (s.getInstanceId().equals(scheduleID))
              {
                 return s;
              }
           }
        }
View Full Code Here


  }

  @Override
  public Scheduler getSchedulerByJmx(QuartzInstance quartzInstance, ObjectName objectName)
      throws Exception {
      Scheduler scheduler = new Scheduler();
        MBeanServerConnection connection = quartzInstance.getMBeanServerConnection();
        scheduler.setObjectName(objectName);
        scheduler.setName((String) connection.getAttribute(objectName, "SchedulerName"));
        scheduler.setInstanceId((String) connection.getAttribute(objectName, "SchedulerInstanceId"));
        scheduler.setJobStoreClassName((String) connection.getAttribute(objectName, "JobStoreClassName"));
        scheduler.setThreadPoolClassName((String) connection.getAttribute(objectName, "ThreadPoolClassName"));
        scheduler.setThreadPoolSize((Integer) connection.getAttribute(objectName, "ThreadPoolSize"));
        scheduler.setShutdown((Boolean) connection.getAttribute(objectName, "Shutdown"));
        scheduler.setStarted((Boolean) connection.getAttribute(objectName, "Started"));
        scheduler.setStandByMode((Boolean) connection.getAttribute(objectName, "StandbyMode"));
        scheduler.setQuartzInstanceUUID(quartzInstance.getUuid());
        scheduler.setVersion(this.getVersion(quartzInstance, objectName));
        return scheduler;
  }
View Full Code Here

      for (ObjectName objectName : names)   // for each scheduler.
      {
         QuartzJMXAdapter jmxAdapter = QuartzJMXAdapterFactory.initQuartzJMXAdapter(objectName, connection);
         quartzInstance.setJmxAdapter(jmxAdapter);

         Scheduler scheduler = jmxAdapter.getSchedulerByJmx(quartzInstance, objectName);
         schList.add(scheduler);

         // attach listener
//         connection.addNotificationListener(objectName, listener, null, null);
         log.info("added listener " + objectName.getCanonicalName());
View Full Code Here

    QuartzInstance instance = Tools.getQuartzInstance();
    List<Scheduler> schedulers = instance.getSchedulerList();
    log.info(" schedulers list size:"+schedulers.size());

    Job job = JobContainer.getJobById(jobId);
    Scheduler scheduler = instance.getSchedulerByName(job.getSchedulerName());

    List<Trigger> temp = instance.getJmxAdapter().getTriggersForJob(instance, scheduler,job.getJobName(), job.getGroup());
    if(temp == null || temp.size() == 0){
      return "list";
    }
View Full Code Here

    log.info(" schedulers list size:"+schedulers.size());
     if (schedulers != null && schedulers.size() > 0)
         {
             for (int i = 0; i < schedulers.size(); i++)
             {
                 Scheduler scheduler = schedulers.get(i);
                 List<Job> temp = instance.getJmxAdapter().getJobDetails(instance, scheduler);
                 for(Job job : temp){
                   String id = Tools.generateUUID();
                   job.setUuid(id);
                   JobContainer.addJob(id, job);
View Full Code Here

TOP

Related Classes of com.quartz.monitor.object.Scheduler

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.