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 java.lang.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 void
afterPropertiesSet()
afterPropertiesSetAckdConfigurationDao
getAckdConfigDao()
getAckdConfigDaoAckProcessor
getAckProcessor()
getAckProcessorjava.util.concurrent.Future<?>
getFuture()
getFuturejava.lang.String
getName()
getNameAckReader.AckReaderState
getState()
getStatevoid
pause()
pausevoid
resume(java.util.concurrent.ScheduledThreadPoolExecutor executor)
resumevoid
setAckdConfigDao(AckdConfigurationDao ackdConfigDao)
setAckdConfigDaovoid
setAckProcessor(AckProcessor ackProcessor)
setAckProcessorvoid
setName(java.lang.String name)
setNamevoid
start(java.util.concurrent.ScheduledThreadPoolExecutor executor, ReaderSchedule schedule, boolean reloadConfig)
startvoid
stop()
stopjava.lang.String
toString()
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- if any.
-
start
public void start(java.util.concurrent.ScheduledThreadPoolExecutor executor, ReaderSchedule schedule, boolean reloadConfig) throws java.lang.IllegalStateException
start
- Specified by:
start
in interfaceAckReader
- Parameters:
executor
- aScheduledThreadPoolExecutor
object.schedule
- aReaderSchedule
object.reloadConfig
- a boolean.- Throws:
java.lang.IllegalStateException
-
pause
public void pause() throws java.lang.IllegalStateException
pause
-
resume
public void resume(java.util.concurrent.ScheduledThreadPoolExecutor executor) throws java.lang.IllegalStateException
resume
-
stop
public void stop() throws java.lang.IllegalStateException
stop
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setAckProcessor
public void setAckProcessor(AckProcessor ackProcessor)
setAckProcessor
- Specified by:
setAckProcessor
in interfaceAckReader
- Parameters:
ackProcessor
- aAckProcessor
object.
-
getAckProcessor
public AckProcessor getAckProcessor()
getAckProcessor
- Specified by:
getAckProcessor
in interfaceAckReader
- Returns:
- a
AckProcessor
object.
-
setAckdConfigDao
public void setAckdConfigDao(AckdConfigurationDao ackdConfigDao)
setAckdConfigDao
- Parameters:
ackdConfigDao
- aAckdConfigurationDao
object.
-
getAckdConfigDao
public AckdConfigurationDao getAckdConfigDao()
getAckdConfigDao
- Returns:
- a
AckdConfigurationDao
object.
-
getState
public AckReader.AckReaderState getState()
getState
-
getFuture
public java.util.concurrent.Future<?> getFuture()
getFuture
- Returns:
- a
Future
object.
-
getName
public java.lang.String getName()
getName
-
-