OpenNMS API 1.2.3

org.opennms.netmgt.collectd
Class DataSource

java.lang.Object
  extended byorg.opennms.netmgt.collectd.DataSource
Direct Known Subclasses:
RRDDataSource, StringDataSource

public abstract class DataSource
extends java.lang.Object

Author:
craig.miskell@agresearch.co.nz

Field Summary
protected  java.lang.String m_instance
          Instance identifier which is appended to the object identifier to identify a particular MIB entry.
protected  java.lang.String m_name
          Data Source Name.
protected  java.lang.String m_oid
          Object's identifier in dotted-decimal notation (e.g, ".1.3.6.1.2.1.1.1").
 
Constructor Summary
DataSource()
           
DataSource(MibObject obj)
           
 
Method Summary
static DataSource dataSourceForMibObject(MibObject obj, java.lang.String collectionName)
           
protected  java.lang.String getFullOid(java.lang.String ifIndex)
           
 java.lang.String getInstance()
          Returns the object's instance id.
 java.lang.String getName()
          Returns the object's name.
 java.lang.String getOid()
          Returns the object's identifier.
abstract  java.lang.String getStorableValue(SnmpSyntax snmpVar)
          This method extracts from snmpVar a string which can be passed as the val parameter of performUpdate.
abstract  boolean performUpdate(java.lang.String collectionName, java.lang.String owner, java.lang.String repository, java.lang.String dsName, java.lang.String val)
          Stores the value val in the datasource named dsName, in repository repository.
 void setInstance(java.lang.String instance)
          This method is used to assign the object's instance id.
 void setName(java.lang.String name)
          This method is used to assign the data source name.
 void setOid(java.lang.String oid)
          This method is used to assign the object's identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_oid

protected java.lang.String m_oid
Object's identifier in dotted-decimal notation (e.g, ".1.3.6.1.2.1.1.1"). Identifies the MIB object which is the source of data values for this RRD data source.


m_instance

protected java.lang.String m_instance
Instance identifier which is appended to the object identifier to identify a particular MIB entry. This value may be an integer value or "ifIndex".


m_name

protected java.lang.String m_name
Data Source Name. This is not only the name of the data source but should identify the MIB object as well (e.g., "ifOctetsIn").

Constructor Detail

DataSource

public DataSource()

DataSource

public DataSource(MibObject obj)
Parameters:
obj -
Method Detail

dataSourceForMibObject

public static DataSource dataSourceForMibObject(MibObject obj,
                                                java.lang.String collectionName)

performUpdate

public abstract boolean performUpdate(java.lang.String collectionName,
                                      java.lang.String owner,
                                      java.lang.String repository,
                                      java.lang.String dsName,
                                      java.lang.String val)
Stores the value val in the datasource named dsName, in repository repository. Creates the store if need be (e.g. an rrd file, or a properties file, or whatever)


getStorableValue

public abstract java.lang.String getStorableValue(SnmpSyntax snmpVar)
This method extracts from snmpVar a string which can be passed as the val parameter of performUpdate.


getFullOid

protected java.lang.String getFullOid(java.lang.String ifIndex)

setOid

public void setOid(java.lang.String oid)
This method is used to assign the object's identifier.

Parameters:
oid - - object identifier in dotted decimal notation (e.g., ".1.3.6.1.2.1.1.1")

setInstance

public void setInstance(java.lang.String instance)
This method is used to assign the object's instance id.

Parameters:
instance - - instance identifier (to be appended to oid)

setName

public void setName(java.lang.String name)
This method is used to assign the data source name.


getOid

public java.lang.String getOid()
Returns the object's identifier.

Returns:
The object's identifier string.

getInstance

public java.lang.String getInstance()
Returns the object's instance id.

Returns:
The object's instance id string.

getName

public java.lang.String getName()
Returns the object's name.

Returns:
The object's name.

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.