Class RTCConfigFactory

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    public final class RTCConfigFactory
    extends Object
    implements org.springframework.beans.factory.InitializingBean
    This is the singleton class used to load the configuration for the OpenNMS RTC from the rtc-configuration xml file. Note: Users of this class should make sure the init() is called before calling any other method to ensure the config is loaded before accessing other convenience methods.
    Author:
    Sowmya Nataraj , OpenNMS
    • Constructor Detail

      • RTCConfigFactory

        public RTCConfigFactory()
        Default constructor.
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws IOException
        Load the config from the default config file and create the singleton instance of this factory.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        IOException - Thrown if the specified config file cannot be read/loaded
        IOException - if any.
      • getUpdaters

        public int getUpdaters()
        Return the number of updater threads to be started.
        Returns:
        the number of updater threads to be started
      • getSenders

        public int getSenders()
        Return the number of sender to be started.
        Returns:
        the number of sender threads to be started
      • getRollingWindowStr

        public String getRollingWindowStr()
        Return the rolling window for which availability is to be computed.
        Returns:
        the rolling window for which availability is to be computed
      • getRollingWindow

        public long getRollingWindow()
        Return the rolling window for which availability is to be computed.
        Returns:
        the rolling window for which availability is to be computed
      • getMaxEventsBeforeResend

        public int getMaxEventsBeforeResend()
        Return the max number of events after which data is to resent.
        Returns:
        the max number of events after which data is to resent
      • getLowThresholdIntervalStr

        public String getLowThresholdIntervalStr()
        Return the low threshold interval at which data is to be resent.
        Returns:
        the low threshold interval at which data is to be resent
      • getLowThresholdInterval

        public long getLowThresholdInterval()
        Return the low threshold interval at which data is to be resent.
        Returns:
        the low threshold interval at which data is to be resent
      • getHighThresholdIntervalStr

        public String getHighThresholdIntervalStr()
        Return the high threshold interval at which data is to be resent.
        Returns:
        the high threshold interval at which data is to be resent
      • getHighThresholdInterval

        public long getHighThresholdInterval()
        Return the high threshold interval at which data is to be resent.
        Returns:
        the high threshold interval at which data is to be resent
      • getUserRefreshIntervalStr

        public String getUserRefreshIntervalStr()
        Return the user refresh interval at which data is to be resent - this is the interval at which data is resent when no events are received.
        Returns:
        the user refresh interval at which data is to be resent
      • getUserRefreshInterval

        public long getUserRefreshInterval()
        Return the user refresh interval at which data is to be resent - this is the interval at which data is resent when no events are received.
        Returns:
        the user refresh interval at which data is to be resent
      • getErrorsBeforeUrlUnsubscribe

        public int getErrorsBeforeUrlUnsubscribe()
        Return the number of times posts are tried with errors before an URL is automatically unsubscribed. A negative value means URL is never unsubscribed
        Returns:
        the number of times posts are tried with errors before an URL is automatically unsubscribed