|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.MonitoringLocationsFactory
public class MonitoringLocationsFactory
| Field Summary | |
|---|---|
protected boolean |
initialized
Boolean indicating if the init() method has been called. |
protected static java.util.Map<java.lang.String,org.opennms.netmgt.config.monitoringLocations.LocationDef> |
m_defsMap
|
protected static long |
m_lastModified
Timestamp of the config file, used to know when to reload from disk. |
| Constructor Summary | |
|---|---|
MonitoringLocationsFactory(java.io.Reader rdr)
|
|
MonitoringLocationsFactory(java.lang.String configFile)
|
|
| Method Summary | |
|---|---|
static org.opennms.netmgt.config.monitoringLocations.MonitoringLocationsConfiguration |
getConfig()
|
org.opennms.netmgt.config.monitoringLocations.LocationDef |
getDef(java.lang.String defName)
Can't be null |
static java.util.Map<java.lang.String,org.opennms.netmgt.config.monitoringLocations.LocationDef> |
getDefsMap()
|
static MonitoringLocationsFactory |
getInstance()
Singleton static call to get the only instance that should exist for the MonioringLocationsFactory |
static void |
init()
Be sure to call this method before calling getInstance(). |
void |
reload()
|
static void |
setConfig(org.opennms.netmgt.config.monitoringLocations.MonitoringLocationsConfiguration m_config)
|
static void |
setDefsMap(java.util.Map<java.lang.String,org.opennms.netmgt.config.monitoringLocations.LocationDef> map)
|
static void |
setInstance(MonitoringLocationsFactory instance)
|
protected void |
updateFromFile()
Reload the config file if it has been changed since we last read it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean initialized
protected static long m_lastModified
protected static java.util.Map<java.lang.String,org.opennms.netmgt.config.monitoringLocations.LocationDef> m_defsMap
| Constructor Detail |
|---|
public MonitoringLocationsFactory(java.lang.String configFile)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.IOException
public MonitoringLocationsFactory(java.io.Reader rdr)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException| Method Detail |
|---|
public static void init()
throws java.io.IOException,
java.io.FileNotFoundException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
java.io.FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic static MonitoringLocationsFactory getInstance()
java.lang.IllegalStateException - if init has not been calledpublic static void setInstance(MonitoringLocationsFactory instance)
public void reload()
throws java.io.IOException,
java.io.FileNotFoundException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
java.io.FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public org.opennms.netmgt.config.monitoringLocations.LocationDef getDef(java.lang.String defName)
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
protected void updateFromFile()
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic static org.opennms.netmgt.config.monitoringLocations.MonitoringLocationsConfiguration getConfig()
public static void setConfig(org.opennms.netmgt.config.monitoringLocations.MonitoringLocationsConfiguration m_config)
public static java.util.Map<java.lang.String,org.opennms.netmgt.config.monitoringLocations.LocationDef> getDefsMap()
public static void setDefsMap(java.util.Map<java.lang.String,org.opennms.netmgt.config.monitoringLocations.LocationDef> map)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||