/*
The scheduler service that is used to trigger fetch tasks.
*/
ScheduledExecutorService scheduler = new JMXEnabledScheduledThreadPoolExecutor(numThreads, jmxPath, "scheduler");
MailQueue queue = queueFactory.getQueue(MailQueueFactory.SPOOL);
List<HierarchicalConfiguration> fetchConfs = conf.configurationsAt("fetch");
for (HierarchicalConfiguration fetchConf : fetchConfs) {
// read configuration
Long interval = fetchConf.getLong("interval");