}
@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;
}