Class EnhancedLinkdConfigFactory

  • All Implemented Interfaces:
    EnhancedLinkdConfig

    public final class EnhancedLinkdConfigFactory
    extends EnhancedLinkdConfigManager
    This is the singleton class used to load the configuration for the OpenNMS enhanced linkd service from the enlinkd-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:
    Antonio Russo, OpenNMS
    • Constructor Detail

      • EnhancedLinkdConfigFactory

        public EnhancedLinkdConfigFactory()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • EnhancedLinkdConfigFactory

        public EnhancedLinkdConfigFactory​(java.io.InputStream stream)
                                   throws java.io.IOException

        Constructor for LinkdConfigFactory.

        Parameters:
        currentVersion - a long.
        stream - a InputStream object.
        Throws:
        java.io.IOException - if any.
    • Method Detail

      • saveXml

        protected void saveXml​(java.lang.String xml)
                        throws java.io.IOException

        saveXml

        Specified by:
        saveXml in class EnhancedLinkdConfigManager
        Parameters:
        xml - a String object.
        Throws:
        java.io.IOException - if any.
      • reload

        public void reload()
                    throws java.io.IOException

        reload

        Throws:
        java.io.IOException - if any.
      • reloadXML

        protected void reloadXML​(java.io.InputStream stream)
                          throws java.io.IOException

        reloadXML

        Parameters:
        stream - a InputStream object.
        Throws:
        java.io.IOException - if any.
      • save

        public void save()
                  throws java.io.IOException
        Saves the current in-memory configuration to disk
        Throws:
        java.io.IOException - if any.