/** * Retrieve the messages in the configured mail folder, searches for notification replies, * and creates and processes the acknowledgments. */ protected void findAndProcessAcks() { LOG.debug("findAndProcessAcks: checking for acknowledgments..."); Collection<OnmsAcknowledgment> acks; try { List<Message> msgs = retrieveAckMessages(); //TODO: need a read *new* messages feature acks = createAcks(msgs); if (acks != null) { LOG.debug("findAndProcessAcks: Found {} acks. Processing...", acks.size()); m_ackDao.processAcks(acks); LOG.debug("findAndProcessAcks: acks processed."); } } catch (JavaMailerException e) { LOG.error("findAndProcessAcks: Exception thrown in JavaMail", e); } LOG.debug("findAndProcessAcks: completed checking for and processing acknowledgments."); }
} finally { if (acks.size() > 0) { m_ackDao.processAcks(acks);