public class HttpCollectionConfigFactory extends Object
HttpCollectionConfigFactory class.
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
initialized
Boolean indicating if the init() method has been called. 
 | 
protected static long | 
m_lastModified
Timestamp of the http collection config, used to know when to reload from disk. 
 | 
| Constructor and Description | 
|---|
HttpCollectionConfigFactory(InputStream stream)
Constructor for HttpCollectionConfigFactory. 
 | 
HttpCollectionConfigFactory(String configFile)
Constructor for HttpCollectionConfigFactory. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static HttpDatacollectionConfig | 
getConfig()
getConfig 
 | 
HttpCollection | 
getHttpCollection(String collectionName)
getHttpCollection 
 | 
static HttpCollectionConfigFactory | 
getInstance()
Singleton static call to get the only instance that should exist 
 | 
List<String> | 
getRRAList(String cName)
getRRAList 
 | 
String | 
getRrdPath()
getRrdPath 
 | 
RrdRepository | 
getRrdRepository(String collectionName)
getRrdRepository 
 | 
int | 
getStep(String cName)
getStep 
 | 
static void | 
init()
Be sure to call this method before calling getInstance(). 
 | 
void | 
reload()
reload 
 | 
static void | 
setConfig(HttpDatacollectionConfig m_config)
setConfig 
 | 
static void | 
setInstance(HttpCollectionConfigFactory instance)
setInstance 
 | 
protected void | 
updateFromFile()
Reload the http-datacollection-config.xml file if it has been changed since we last
 read it. 
 | 
protected boolean initialized
protected static long m_lastModified
public HttpCollectionConfigFactory(String configFile) throws IOException
Constructor for HttpCollectionConfigFactory.
configFile - a String object.IOException - if any.public HttpCollectionConfigFactory(InputStream stream) throws IOException
Constructor for HttpCollectionConfigFactory.
stream - a InputStream object.IOExceptionpublic static void init()
                 throws IOException,
                        FileNotFoundException
IOException - if any.FileNotFoundException - if any.public static HttpCollectionConfigFactory getInstance()
IllegalStateException - if init has not been calledpublic static void setInstance(HttpCollectionConfigFactory instance)
setInstance
instance - a HttpCollectionConfigFactory object.public void reload()
            throws IOException,
                   FileNotFoundException
reload
IOException - if any.FileNotFoundException - if any.protected void updateFromFile()
                       throws IOException
IOException - if any.public static HttpDatacollectionConfig getConfig()
getConfig
HttpDatacollectionConfig object.public static void setConfig(HttpDatacollectionConfig m_config)
setConfig
m_config - a HttpDatacollectionConfig object.public HttpCollection getHttpCollection(String collectionName)
getHttpCollection
collectionName - a String object.HttpCollection object.public RrdRepository getRrdRepository(String collectionName)
getRrdRepository
collectionName - a String object.RrdRepository object.public int getStep(String cName)
getStep
cName - a String object.Copyright © 2021. All rights reserved.