Package org.opennms.netmgt.ackd.readers
Class DefaultAckReader
- java.lang.Object
-
- org.opennms.netmgt.ackd.readers.DefaultAckReader
-
- All Implemented Interfaces:
AckReader,org.springframework.beans.factory.InitializingBean
public class DefaultAckReader extends Object implements AckReader, org.springframework.beans.factory.InitializingBean
Acknowledgment Reader implementation using Java Mail DONE: Identify acknowledgments for sent notifications DONE: Identify acknowledgments for alarm IDs (how the send knows the ID, good question) DONE: Persist acknowledgments DONE: Identify escalation reply DONE: Identify clear reply DOND: Identify unacknowledged reply DONE: Formalize Acknowledgment parameters (ack-type, id) DONE: JavaMail configuration factory DONE: Ackd configuration factory TODO: Associate email replies with openNMS user DONE: Finish scheduling component of JavaAckReader DONE: Configurable Schedule DONE: Identify Java Mail configuration element to use for reading replies TODO: Migrate JavaMailNotificationStrategy to new JavaMail Configuration and JavaSendMailer TODO: Migrate Availability Reports send via JavaMail to new JavaMail Configuration and JavaSendMailer TODO: Move reading email messages from MTM to JavaReadMailer class DONE: Need an event to cause re-loading of schedules based on changes to ackd-configuration DONE: Do some proper logging DONE: Handle "enabled" flag of the readers in ackd-configuration DONE: Move executor to Ackd daemon- Version:
- $Id: $
- Author:
- David Hustace
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.netmgt.ackd.AckReader
AckReader.AckReaderState
-
-
Constructor Summary
Constructors Constructor Description DefaultAckReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()afterPropertiesSetAckdConfigurationDaogetAckdConfigDao()getAckdConfigDaoAckProcessorgetAckProcessor()getAckProcessorFuture<?>getFuture()getFutureStringgetName()getNameAckReader.AckReaderStategetState()getStatevoidpause()pausevoidresume(ScheduledThreadPoolExecutor executor)resumevoidsetAckdConfigDao(AckdConfigurationDao ackdConfigDao)setAckdConfigDaovoidsetAckProcessor(AckProcessor ackProcessor)setAckProcessorvoidsetName(String name)setNamevoidstart(ScheduledThreadPoolExecutor executor, ReaderSchedule schedule, boolean reloadConfig)startvoidstop()stopStringtoString()
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws ExceptionafterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception- if any.
-
start
public void start(ScheduledThreadPoolExecutor executor, ReaderSchedule schedule, boolean reloadConfig) throws IllegalStateException
start
- Specified by:
startin interfaceAckReader- Parameters:
executor- aScheduledThreadPoolExecutorobject.schedule- aReaderScheduleobject.reloadConfig- a boolean.- Throws:
IllegalStateException
-
pause
public void pause() throws IllegalStateExceptionpause
- Specified by:
pausein interfaceAckReader- Throws:
IllegalStateException- if any.
-
resume
public void resume(ScheduledThreadPoolExecutor executor) throws IllegalStateException
resume
- Specified by:
resumein interfaceAckReader- Parameters:
executor- aScheduledThreadPoolExecutorobject.- Throws:
IllegalStateException
-
stop
public void stop() throws IllegalStateExceptionstop
- Specified by:
stopin interfaceAckReader- Throws:
IllegalStateException- if any.
-
setAckProcessor
public void setAckProcessor(AckProcessor ackProcessor)
setAckProcessor
- Specified by:
setAckProcessorin interfaceAckReader- Parameters:
ackProcessor- aAckProcessorobject.
-
getAckProcessor
public AckProcessor getAckProcessor()
getAckProcessor
- Specified by:
getAckProcessorin interfaceAckReader- Returns:
- a
AckProcessorobject.
-
setAckdConfigDao
public void setAckdConfigDao(AckdConfigurationDao ackdConfigDao)
setAckdConfigDao
- Parameters:
ackdConfigDao- aAckdConfigurationDaoobject.
-
getAckdConfigDao
public AckdConfigurationDao getAckdConfigDao()
getAckdConfigDao
- Returns:
- a
AckdConfigurationDaoobject.
-
getState
public AckReader.AckReaderState getState()
getState
-
getName
public String getName()
getName
-
-