{
triggers = new ArrayList();
for (int i = 0; i < list.size(); i++)
{
CompositeDataSupport compositeDataSupport = (CompositeDataSupport) list.get(i);
Trigger trigger = new Trigger();
trigger.setCalendarName((String) JMXUtil.convertToType(compositeDataSupport, "calendarName"));
trigger.setDescription((String) JMXUtil.convertToType(compositeDataSupport, "description"));
trigger.setEndTime((Date) JMXUtil.convertToType(compositeDataSupport, "endTime"));
trigger.setFinalFireTime((Date) JMXUtil.convertToType(compositeDataSupport, "finalFireTime"));
trigger.setFireInstanceId((String) JMXUtil.convertToType(compositeDataSupport, "fireInstanceId"));
trigger.setGroup((String) JMXUtil.convertToType(compositeDataSupport, "group"));
trigger.setJobGroup((String) JMXUtil.convertToType(compositeDataSupport, "jobGroup"));
trigger.setJobName((String) JMXUtil.convertToType(compositeDataSupport, "jobName"));
trigger.setMisfireInstruction(((Integer) JMXUtil.convertToType(compositeDataSupport, "misfireInstruction")).intValue());
trigger.setName((String) JMXUtil.convertToType(compositeDataSupport, "name"));
trigger.setNextFireTime((Date) JMXUtil.convertToType(compositeDataSupport, "nextFireTime"));
trigger.setPreviousFireTime((Date) JMXUtil.convertToType(compositeDataSupport, "previousFireTime"));
trigger.setPriority(((Integer) JMXUtil.convertToType(compositeDataSupport, "priority")).intValue());
trigger.setStartTime((Date) JMXUtil.convertToType(compositeDataSupport, "startTime"));
try // get current trigger state
{
JMXInput stateJmxInput = new JMXInput(quartzInstance, new String[]{String.class.getName(), String.class.getName()}, "getTriggerState", new Object[]{trigger.getName(), trigger.getGroup()}, scheduler.getObjectName());
String state = (String) callJMXOperation(stateJmxInput);
trigger.setSTriggerState(state);
}
catch (Throwable tt)
{
trigger.setSTriggerState(Trigger.STATE_GET_ERROR);
}
triggers.add(trigger);
}
}