|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.DataCollectionConfigFactory
public final class DataCollectionConfigFactory
This class is the main respository for SNMP data collection configuration information used by the SNMP service monitor. When this class is loaded it reads the snmp data collection configuration into memory. 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.
| Field Summary |
|---|
| Fields inherited from interface org.opennms.netmgt.config.DataCollectionConfig |
|---|
ALL_IF_ATTRIBUTES, NODE_ATTRIBUTES |
| Constructor Summary | |
|---|---|
DataCollectionConfigFactory(java.io.Reader rdr)
|
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,org.opennms.netmgt.config.datacollection.ResourceType> |
getConfiguredResourceTypes()
|
static DataCollectionConfig |
getInstance()
Return the singleton instance of this factory. |
int |
getMaxVarsPerPdu(java.lang.String cName)
Retrieves the configured value for the maximum number of variables (oids) which can be encoded into a single outgoing SNMP PDU request.. |
java.util.List<MibObject> |
getMibObjectList(java.lang.String cName,
java.lang.String aSysoid,
java.lang.String anAddress,
int ifType)
This method returns the list of MIB objects associated with a particular system object id, IP address, and ifType for the specified collection. |
java.util.List |
getRRAList(java.lang.String cName)
Retrieves configured list of RoundRobin Archive statements. |
java.lang.String |
getRrdPath()
|
org.opennms.netmgt.model.RrdRepository |
getRrdRepository(java.lang.String collectionName)
|
java.lang.String |
getSnmpStorageFlag(java.lang.String cName)
Retrieves the configured value of the SNMP storage flag. |
int |
getStep(java.lang.String cName)
Retrieves configured RRD step size. |
static void |
init()
Load the config from the default config file and create the singleton instance of this factory. |
void |
processConfiguredResourceTypes()
|
static void |
reload()
Reload the config from the default config file |
static void |
setInstance(DataCollectionConfig instance)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataCollectionConfigFactory(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 java.util.Map<java.lang.String,org.opennms.netmgt.config.datacollection.ResourceType> getConfiguredResourceTypes()
getConfiguredResourceTypes in interface DataCollectionConfigpublic void processConfiguredResourceTypes()
public static void setInstance(DataCollectionConfig instance)
public static void init()
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException - Thrown if the specified config file cannot be read
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.
public static void reload()
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException - Thrown if the specified config file cannot be read/loaded
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.public static DataCollectionConfig getInstance()
java.lang.IllegalStateException - Thrown if the factory has not yet been initialized.
public java.util.List<MibObject> getMibObjectList(java.lang.String cName,
java.lang.String aSysoid,
java.lang.String anAddress,
int ifType)
getMibObjectList in interface DataCollectionConfigcName - name of the data collection from which to retrieve oid
information.aSysoid - system object id to look up in the collectionanAddress - IP address to look up in the collectionifType - Interface type (-1 indicates that only node-level objects
should be retrieved.
public int getStep(java.lang.String cName)
getStep in interface DataCollectionConfigcName - Name of the data collection
public java.util.List getRRAList(java.lang.String cName)
getRRAList in interface DataCollectionConfigcName - Name of the data collection
public java.lang.String getSnmpStorageFlag(java.lang.String cName)
getSnmpStorageFlag in interface DataCollectionConfigcName - Name of the data collection
public int getMaxVarsPerPdu(java.lang.String cName)
getMaxVarsPerPdu in interface DataCollectionConfigcName - Name of the data collection
public org.opennms.netmgt.model.RrdRepository getRrdRepository(java.lang.String collectionName)
getRrdRepository in interface DataCollectionConfigpublic java.lang.String getRrdPath()
getRrdPath in interface DataCollectionConfig
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||