org.opennms.netmgt.config
Class MibObject

java.lang.Object
  extended by org.opennms.netmgt.config.MibObject
All Implemented Interfaces:
Collectable

public class MibObject
extends Object
implements Collectable

This class is responsible for holding information about a particular MIB object parsed from the DataCollection.xml file.

Version:
1.1.1.1
Author:
Mike , OpenNMS , Mike , OpenNMS

Field Summary
static String INSTANCE_IFADDRESS
          Indicates that the interface's IP address is to be appended to the object's oid.
static String INSTANCE_IFINDEX
          Indicates that the interface's 'ifIndex' value from the 'ipInterface' table of the database should be appended to the object's oid.
 
Constructor Summary
MibObject()
          Constructor
 
Method Summary
 boolean equals(Object object)
           This method is responsible for comparing this MibObject with the passed Object to determine if they are equivalent.
 String getAlias()
          Returns the object's alias.
 CollectionTracker getCollectionTracker()
          getCollectionTracker
 CollectionTracker getCollectionTracker(SnmpInstId... instances)
          getCollectionTracker
static CollectionTracker[] getCollectionTrackers(List<MibObject> objList)
          getCollectionTrackers
static CollectionTracker[] getCollectionTrackers(List<MibObject> objList, SnmpInstId... instances)
          getCollectionTrackers
 String getGroupIfType()
          getGroupIfType
 String getGroupName()
          getGroupName
 String getInstance()
          Returns the instance string associated with the object.
 String getMaxval()
          Returns the object's maximum value.
 String getMinval()
          Returns the object's minimum value.
 String getOid()
          Returns the object's identifier.
 ResourceType getResourceType()
          getResourceType
 SnmpObjId getSnmpObjId()
          getSnmpObjId
 String getType()
          Returns the object's data type.
 int hashCode()
          hashCode
 void setAlias(String alias)
          This method is used to assign the object's alias.
 void setGroupIfType(String groupIfType)
          setGroupIfType
 void setGroupName(String groupName)
          setGroupName
 void setInstance(String instance)
          This method is used to specify the object's instance to be retrieved.
 void setMaxval(String maxval)
          This method is used to assign the object's maximum value.
 void setMinval(String minval)
          This method is used to assign the object's minimum value.
 void setOid(String oid)
          This method is used to assign the object's identifier.
 void setResourceType(ResourceType resourceType)
          setResourceType
 void setType(String type)
          This method is used to assign the object's expected data type.
 String toString()
          This method is responsible for returning a String object which represents the content of this MibObject.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE_IFINDEX

public static final String INSTANCE_IFINDEX
Indicates that the interface's 'ifIndex' value from the 'ipInterface' table of the database should be appended to the object's oid.

See Also:
Constant Field Values

INSTANCE_IFADDRESS

public static final String INSTANCE_IFADDRESS
Indicates that the interface's IP address is to be appended to the object's oid.

See Also:
Constant Field Values
Constructor Detail

MibObject

public MibObject()
Constructor

Method Detail

setOid

public void setOid(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")

setAlias

public void setAlias(String alias)
This method is used to assign the object's alias.

Parameters:
alias - - object alias (e.g., "sysDescription")

setType

public void setType(String type)
This method is used to assign the object's expected data type.

Parameters:
type - - object's data type

setMaxval

public void setMaxval(String maxval)
This method is used to assign the object's maximum value.

Parameters:
maxval - object's maximum value

setMinval

public void setMinval(String minval)
This method is used to assign the object's minimum value.

Parameters:
minval - object's minimum value

setInstance

public void setInstance(String instance)
This method is used to specify the object's instance to be retrieved. The instance specified here will be dereferenced if necessary and appended to the object's identifier string. Valid instance values are keywords such as "ifIndex" and "ifAddress" or numeric values such as "0" or "99". Numeric values will simply be appended to the objects identifer as-is while keyword values will be dereferenced and will be assigned a valued which is dependent on the SNMP agent's IP address.

Parameters:
instance - a String object.
See Also:
INSTANCE_IFINDEX, INSTANCE_IFADDRESS, INSTANCE_IFINDEX, INSTANCE_IFADDRESS

setGroupName

public void setGroupName(String groupName)

setGroupName

Parameters:
groupName - a String object.

getOid

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

Returns:
The object's identifier string.

getMaxval

public String getMaxval()
Returns the object's maximum value.

Returns:
The object's maxval.

getMinval

public String getMinval()
Returns the object's minimum value.

Returns:
The object's minval.

getAlias

public String getAlias()
Returns the object's alias.

Returns:
The object's alias.

getType

public String getType()
Returns the object's data type.

Returns:
The object's data type

getInstance

public String getInstance()
Returns the instance string associated with the object.

Returns:
The instance value associated with the object

getGroupName

public String getGroupName()

getGroupName

Returns:
a String object.

equals

public boolean equals(Object object)
This method is responsible for comparing this MibObject with the passed Object to determine if they are equivalent. The objects are equivalent if the argument is a MibObject object with the same object identifier, instance, alias and type.

Overrides:
equals in class Object

hashCode

public int hashCode()

hashCode

Overrides:
hashCode in class Object
Returns:
a int.

toString

public String toString()
This method is responsible for returning a String object which represents the content of this MibObject. Primarily used for debugging purposes.

Overrides:
toString in class Object
Returns:
String which represents the content of this MibObject

getCollectionTracker

public CollectionTracker getCollectionTracker()

getCollectionTracker

Specified by:
getCollectionTracker in interface Collectable
Returns:
a CollectionTracker object.

getCollectionTracker

public CollectionTracker getCollectionTracker(SnmpInstId... instances)

getCollectionTracker

Parameters:
instances - a SnmpInstId object.
Returns:
a CollectionTracker object.

getCollectionTrackers

public static CollectionTracker[] getCollectionTrackers(List<MibObject> objList)

getCollectionTrackers

Parameters:
objList - a List object.
Returns:
an array of CollectionTracker objects.

getCollectionTrackers

public static CollectionTracker[] getCollectionTrackers(List<MibObject> objList,
                                                        SnmpInstId... instances)

getCollectionTrackers

Parameters:
objList - a List object.
instances - a SnmpInstId object.
Returns:
an array of CollectionTracker objects.

getSnmpObjId

public SnmpObjId getSnmpObjId()

getSnmpObjId

Returns:
a SnmpObjId object.

setGroupIfType

public void setGroupIfType(String groupIfType)

setGroupIfType

Parameters:
groupIfType - a String object.

getGroupIfType

public String getGroupIfType()

getGroupIfType

Returns:
a String object.

setResourceType

public void setResourceType(ResourceType resourceType)

setResourceType

Parameters:
resourceType - a ResourceType object.

getResourceType

public ResourceType getResourceType()

getResourceType

Returns:
a ResourceType object.


Copyright © 2011. All Rights Reserved.