Class 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
    • Constructor Detail

      • DefaultAckReader

        public DefaultAckReader()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception

        afterPropertiesSet

        Specified by:
        afterPropertiesSet in interface org.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 interface AckReader
        Parameters:
        executor - a ScheduledThreadPoolExecutor object.
        schedule - a ReaderSchedule object.
        reloadConfig - a boolean.
        Throws:
        java.lang.IllegalStateException
      • pause

        public void pause()
                   throws java.lang.IllegalStateException

        pause

        Specified by:
        pause in interface AckReader
        Throws:
        java.lang.IllegalStateException - if any.
      • resume

        public void resume​(java.util.concurrent.ScheduledThreadPoolExecutor executor)
                    throws java.lang.IllegalStateException

        resume

        Specified by:
        resume in interface AckReader
        Parameters:
        executor - a ScheduledThreadPoolExecutor object.
        Throws:
        java.lang.IllegalStateException
      • stop

        public void stop()
                  throws java.lang.IllegalStateException

        stop

        Specified by:
        stop in interface AckReader
        Throws:
        java.lang.IllegalStateException - if any.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFuture

        public java.util.concurrent.Future<?> getFuture()

        getFuture

        Returns:
        a Future object.
      • getName

        public java.lang.String getName()

        getName

        Specified by:
        getName in interface AckReader
        Returns:
        a String object.
      • setName

        public void setName​(java.lang.String name)

        setName

        Specified by:
        setName in interface AckReader
        Parameters:
        name - a String object.