Class MemoryPoolMailingListener

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware, StatsCollectionListener

    public class MemoryPoolMailingListener
    extends AbstractFlapListener
    implements org.springframework.context.MessageSourceAware, org.springframework.beans.factory.InitializingBean
    The listener interface for receiving memoryPoolMailing events. The class that is interested in processing a memoryPoolMailing event implements this interface, and the object created with that class is registered with a component using the component's addMemoryPoolMailingListener method. When the memoryPoolMailing event occurs, that object's appropriate method is invoked.
    • Field Detail

      • messageSourceAccessor

        private org.springframework.context.support.MessageSourceAccessor messageSourceAccessor
        The message source accessor.
      • mailer

        @Inject
        private Mailer mailer
        The mailer.
    • Constructor Detail

      • MemoryPoolMailingListener

        public MemoryPoolMailingListener()
    • Method Detail

      • getMessageSourceAccessor

        public org.springframework.context.support.MessageSourceAccessor getMessageSourceAccessor()
        Gets the message source accessor.
        Returns:
        the message source accessor
      • setMessageSource

        public void setMessageSource​(org.springframework.context.MessageSource messageSource)
        Specified by:
        setMessageSource in interface org.springframework.context.MessageSourceAware
      • getMailer

        public Mailer getMailer()
        Gets the mailer.
        Returns:
        the mailer
      • setMailer

        public void setMailer​(Mailer mailer)
        Sets the mailer.
        Parameters:
        mailer - the new mailer
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception
      • sendMail

        protected void sendMail​(StatsCollectionEvent sce,
                                String message,
                                boolean flappingStop)
        Send mail.
        Parameters:
        sce - the sce
        message - the message
        flappingStop - the flapping stop
      • setDefaultFlapInterval

        @Value("${psiprobe.beans.stats.listeners.flapInterval}")
        public void setDefaultFlapInterval​(int defaultFlapInterval)
        Description copied from class: AbstractFlapListener
        Sets the default flap interval.
        Overrides:
        setDefaultFlapInterval in class AbstractFlapListener
        Parameters:
        defaultFlapInterval - the new default flap interval
      • setDefaultFlapStartThreshold

        @Value("${psiprobe.beans.stats.listeners.flapStartThreshold}")
        public void setDefaultFlapStartThreshold​(float defaultFlapStartThreshold)
        Description copied from class: AbstractFlapListener
        Sets the default flap start threshold.
        Overrides:
        setDefaultFlapStartThreshold in class AbstractFlapListener
        Parameters:
        defaultFlapStartThreshold - the new default flap start threshold
      • setDefaultFlapStopThreshold

        @Value("${psiprobe.beans.stats.listeners.flapStopThreshold}")
        public void setDefaultFlapStopThreshold​(float defaultFlapStopThreshold)
        Description copied from class: AbstractFlapListener
        Sets the default flap stop threshold.
        Overrides:
        setDefaultFlapStopThreshold in class AbstractFlapListener
        Parameters:
        defaultFlapStopThreshold - the new default flap stop threshold
      • setDefaultFlapLowWeight

        @Value("${psiprobe.beans.stats.listeners.flapLowWeight}")
        public void setDefaultFlapLowWeight​(float defaultFlapLowWeight)
        Description copied from class: AbstractFlapListener
        Sets the default flap low weight.
        Overrides:
        setDefaultFlapLowWeight in class AbstractFlapListener
        Parameters:
        defaultFlapLowWeight - the new default flap low weight
      • setDefaultFlapHighWeight

        @Value("${psiprobe.beans.stats.listeners.flapHighWeight}")
        public void setDefaultFlapHighWeight​(float defaultFlapHighWeight)
        Description copied from class: AbstractFlapListener
        Sets the default flap high weight.
        Overrides:
        setDefaultFlapHighWeight in class AbstractFlapListener
        Parameters:
        defaultFlapHighWeight - the new default flap high weight