Class HttpCollectionConfigFactory


  • public class HttpCollectionConfigFactory
    extends java.lang.Object

    HttpCollectionConfigFactory class.

    Version:
    $Id: $
    Author:
    David Hustace
    • Field Detail

      • initialized

        protected boolean initialized
        Boolean indicating if the init() method has been called.
      • m_lastModified

        protected static long m_lastModified
        Timestamp of the http collection config, used to know when to reload from disk.
    • Constructor Detail

      • HttpCollectionConfigFactory

        public HttpCollectionConfigFactory​(java.lang.String configFile)
                                    throws java.io.IOException

        Constructor for HttpCollectionConfigFactory.

        Parameters:
        configFile - a String object.
        Throws:
        java.io.IOException - if any.
      • HttpCollectionConfigFactory

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

        Constructor for HttpCollectionConfigFactory.

        Parameters:
        stream - a InputStream object.
        Throws:
        java.io.IOException
    • Method Detail

      • init

        public static void init()
                         throws java.io.IOException,
                                java.io.FileNotFoundException
        Be sure to call this method before calling getInstance().
        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.
      • getInstance

        public static HttpCollectionConfigFactory getInstance()
        Singleton static call to get the only instance that should exist
        Returns:
        the single factory instance
        Throws:
        java.lang.IllegalStateException - if init has not been called
      • reload

        public void reload()
                    throws java.io.IOException,
                           java.io.FileNotFoundException

        reload

        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.
      • updateFromFile

        protected void updateFromFile()
                               throws java.io.IOException
        Reload the http-datacollection-config.xml file if it has been changed since we last read it.
        Throws:
        java.io.IOException - if any.
      • getHttpCollection

        public HttpCollection getHttpCollection​(java.lang.String collectionName)

        getHttpCollection

        Parameters:
        collectionName - a String object.
        Returns:
        a HttpCollection object.
      • getRrdRepository

        public RrdRepository getRrdRepository​(java.lang.String collectionName)

        getRrdRepository

        Parameters:
        collectionName - a String object.
        Returns:
        a RrdRepository object.
      • getStep

        public int getStep​(java.lang.String cName)

        getStep

        Parameters:
        cName - a String object.
        Returns:
        a int.
      • getRRAList

        public java.util.List<java.lang.String> getRRAList​(java.lang.String cName)

        getRRAList

        Parameters:
        cName - a String object.
        Returns:
        a List object.
      • getRrdPath

        public java.lang.String getRrdPath()

        getRrdPath

        Returns:
        a String object.