AdventNet Web NMS 4 API Specification

com.adventnet.nms.topodb
Class SnmpNode

java.lang.Object
  |
  +--com.adventnet.nms.topodb.ManagedObject
        |
        +--com.adventnet.nms.topodb.TopoObject
              |
              +--com.adventnet.nms.topodb.Node
                    |
                    +--com.adventnet.nms.topodb.SnmpNode
All Implemented Interfaces:
_ManagedObject_CIOperations, _Node_CIOperations, _TopoObject_CIOperations, java.lang.Cloneable, DBExtendedInterface, DBInterface, java.io.Serializable

public class SnmpNode
extends Node

This class inherits the Node class and represents the SNMP enabled Nodes discovered by the WebNMS system.

Fields are defined for this object to identify some of the SNMP properties of the SNMP Agent on the Node.

During the discovery process of NMS, if the SNMP queries to the SNMP Agent of the Node succeeds, an SnmpNode object is added into the database.

See Also:
Serialized Form

Fields inherited from class com.adventnet.nms.topodb.TopoObject
PROCEEDSTATUSPOLL
 
Constructor Summary
SnmpNode()
          Constructor to instantiate an SnmpNode object.
SnmpNode(java.lang.String addr, java.lang.String mask)
          Constructor to instantiate an SnmpNode object with the Ipaddress and the netmask arguments.
SnmpNode(java.lang.String addr, java.lang.String mask, java.lang.String domainName)
          Constructor to instantiate an SnmpNode object with the Ipaddress and the netmask arguments.
SnmpNode(java.lang.String addr, java.lang.String mask, java.lang.String domainName, java.lang.String dnsName)
           
 
Method Summary
protected  int checkDHCPNodeStatus()
          The checkDHCPNodeStatus method is invoked during status polling for DHCP client objects.
 java.lang.Object clone()
          Returns the cloned copy of the SnmpNode object.
 java.lang.String getHostNetmask()
          Returns the netmask of the primary interface reported by the snmp agent.
 java.util.Properties getProperties()
          Returns all the Properties of this SnmpNode object.
 java.lang.String getSysDescr()
          Returns the System Descriptor of this node as reported by the SNMP agent.
 java.lang.String getSysName()
          Returns the System Name of this node as reported by the SNMP agent.
 java.lang.String getSysOID()
          Returns the System Object Identifier of this node as reported by the SNMP agent.
 void setHostNetmask(java.lang.String hostNetmask)
          Sets the host netmask of this node which represents the netmask of the primary interface of this node.
 void setProperties(java.util.Properties p)
          This method is used to set the properties of this object.
 void setSysDescr(java.lang.String sysDescr)
          Sets the value for sysDesc, the field representing the System Descriptor of this node.
 void setSysName(java.lang.String sysName)
          Sets the value for sysName, the field representing the system Name of this node.
 void setSysOID(java.lang.String sysOID)
          Sets the value for sysOID, the field representing the system descriptor of this node.
 
Methods inherited from class com.adventnet.nms.topodb.Node
checkStatus_CT, checkStatus, getInterfacesList, getIpaddrs_CT, getIpaddrs, getParentNets_CT, getParentNets, getProperties_CT, getStatus_CT, getTieRefHolder_Node, getUserProperties_CT, setIpaddrs_CT, setIpaddrs, setParentNets_CT, setParentNets, setProperties_CT
 
Methods inherited from class com.adventnet.nms.topodb.TopoObject
getBaseMibs, getCommunity, getContextName, getDomainName, getIpAddress, getIsDHCP, getIsInterface, getIsNetwork, getIsNode, getIsRouter, getIsSNMP, getNetmask, getSnmpport, getTieRefHolder_TopoObject, getUserName, getVersion, getWriteCommunity, setBaseMibs, setCommunity, setContextName, setDomainName, setIpAddress, setIsDHCP, setIsInterface, setIsNetwork, setIsNode, setIsRouter, setIsSNMP, setNetmask, setSnmpport, setUserName, setVersion, setWriteCommunity, toString
 
Methods inherited from class com.adventnet.nms.topodb.ManagedObject
addChildrenKeys, addGroupMembers, addGroupNames, get, getChildrenKeys, getClassname, getDisplayName, getFailureCount, getFailureThreshold, getGroupMembers, getGroupNames, getIsContainer, getIsGroup, getKey, getKeyName, getLockId, getManaged, getName, getOwnerName, getParentKey, getPollInterval, getStatus, getStatus, getStatusChangeTime, getStatusColor, getStatusPollEnabled, getStatusUpdateTime, getTester, getTieRefHolder_ManagedObject, getType, getUClass, getUserProperties, getUserProperty, getUTest, getWebNMS, pollStatus, put, remove, removeChildrenKeys, removeGroupMembers, removeGroupNames, removeUserProperty, setChildrenKeys, setClassname, setDisplayName, setFailureCount, setFailureThreshold, setGroupMembers, setGroupNames, setIsContainer, setIsGroup, setLockId, setManaged, setName, setOwnerName, setParentKey, setPollInterval, setStatus, setStatusChangeTime, setStatusPollEnabled, setStatusUpdateTime, setTester, setType, setUClass, setUserProperty, setUTest, setWebNMS
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.adventnet.nms.topodb.corba._TopoObject_CIOperations
getBaseMibs, getCommunity, getIpAddress, getIsInterface, getIsNetwork, getIsNode, getIsRouter, getIsSNMP, getNetmask, getSnmpport, getWriteCommunity, setBaseMibs, setCommunity, setIpAddress, setIsInterface, setIsNetwork, setIsNode, setIsRouter, setIsSNMP, setNetmask, setSnmpport, setWriteCommunity
 
Methods inherited from interface com.adventnet.nms.topodb.corba._ManagedObject_CIOperations
getClassname, getFailureCount, getFailureThreshold, getGroupNames, getKey, getKeyName, getManaged, getName, getPollInterval, getStatusChangeTime, getStatusUpdateTime, getTester, getType, getUClass, getUserProperty, getWebNMS, pollStatus, removeUserProperty, setFailureThreshold, setGroupNames, setManaged, setName, setPollInterval, setStatus, setStatusChangeTime, setStatusUpdateTime, setTester, setType, setUClass, setUserProperty, setWebNMS
 

Constructor Detail

SnmpNode

public SnmpNode()
Constructor to instantiate an SnmpNode object.

SnmpNode

public SnmpNode(java.lang.String addr,
                java.lang.String mask)
Constructor to instantiate an SnmpNode object with the Ipaddress and the netmask arguments.
Parameters:
addr - The ipaddress of this node.
mask - The netmask of this node.

SnmpNode

public SnmpNode(java.lang.String addr,
                java.lang.String mask,
                java.lang.String domainName)
Constructor to instantiate an SnmpNode object with the Ipaddress and the netmask arguments.
Parameters:
addr - The ipaddress of this node.
mask - The netmask of this node.
domainName - The domainName of this node.

SnmpNode

public SnmpNode(java.lang.String addr,
                java.lang.String mask,
                java.lang.String domainName,
                java.lang.String dnsName)
Method Detail

getHostNetmask

public java.lang.String getHostNetmask()
Returns the netmask of the primary interface reported by the snmp agent.
Returns:
The Netmask of the primary interface reported by the snmp agent.
See Also:
setHostNetmask(java.lang.String)

setHostNetmask

public void setHostNetmask(java.lang.String hostNetmask)
Sets the host netmask of this node which represents the netmask of the primary interface of this node.
Parameters:
hostNetmask - This should be the netmask of the primary interface of this node.
See Also:
getHostNetmask()

getSysDescr

public java.lang.String getSysDescr()
Returns the System Descriptor of this node as reported by the SNMP agent. SysDesc is a textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software. The value of SysDesc is obtained from the SNMP Agent by performing an snmpget operation with the OID "1.1.0".
Returns:
The sysDescr value returned by the SNMP agent in this node.
See Also:
setSysDescr(java.lang.String)

setSysDescr

public void setSysDescr(java.lang.String sysDescr)
Sets the value for sysDesc, the field representing the System Descriptor of this node. SysDesc is a textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software.
Parameters:
sysDescr - The value of the sysDescr.
See Also:
getSysDescr()

getSysName

public java.lang.String getSysName()
Returns the System Name of this node as reported by the SNMP agent. SysName is an administratively-assigned name for this managed node. By convention, this is the node's fully-qualified domain name. The value of SysName is obtained from the SNMP Agent by performing an snmpget operation with the OID "1.5.0".
Returns:
The sysName value returned by the SNMP agent in this node.
See Also:
setSysName(java.lang.String)

setSysName

public void setSysName(java.lang.String sysName)
Sets the value for sysName, the field representing the system Name of this node. SysName is an administratively-assigned name for this managed node. By convention, this is the node's fully-qualified domain name.
Parameters:
sysName - The value of the sysName.
See Also:
getSysName()

getSysOID

public java.lang.String getSysOID()
Returns the System Object Identifier of this node as reported by the SNMP agent. SysOID is the vendor's authoritative identification of the network management subsystem contained in the entity. This value is allocated within the SMI enterprises subtree (1.3.6.1.4.1) and provides an easy and unambiguous means for determining "what kind of box" is being managed. The value of SysOID is obtained from the SNMP Agent by performing an snmpget operation with the OID "1.2.0".
Returns:
The sysOID value returned by the snmp agent in this node.
See Also:
setSysOID(java.lang.String)

setSysOID

public void setSysOID(java.lang.String sysOID)
Sets the value for sysOID, the field representing the system descriptor of this node. SysOID is the vendor's authoritative identification of the network management subsystem contained in the entity. This value is allocated within the SMI enterprises subtree (1.3.6.1.4.1) and provides an easy and unambiguous means for determining "what kind of box" is being managed.
Parameters:
sysOID - The value of the sysOID.
See Also:
getSysOID()

clone

public java.lang.Object clone()
Returns the cloned copy of the SnmpNode object. Super classes should override this method and have their own implementation.
Overrides:
clone in class Node
Returns:
The cloned copy of this object.

setProperties

public void setProperties(java.util.Properties p)
This method is used to set the properties of this object.

Derived classes should override this method and invoke super.setProperties() at the end of this method. The implementation of the setProperties() method in the child class should be as follows.
The method should first get the properties belonging to this class alone from the Properties object, set them to its corresponding fields, remove them from the Properties object and then pass the Properties object with the remaining properties to the setProperties(Properties prop) of its super class.

This operation propagates upto the ultimate base class- ManagedObject. The setProperties() method of ManagedObject class, then removes the properties belonging to it(after setting them to its fields), from the Properties object that is passed to it, and sets the remaining properties as UserProperties.

Note: The name of an object cannot be changed using this method. So, the "name" property must not be one of the properties in the Propeties object, that is passed to this method. If present, this method would ignore it and would set only the other properties present in the Properties object.Please note that the name of an object can be set only using the setName() method of ManagedObject.

Overrides:
setProperties in class Node
Parameters:
p - The properties to be set in this object.
 
 hostNetmask, sysDescr, sysName, sysOID and any property of its super class.
  
See Also:
ManagedObject.setProperties(Properties), getProperties()

getProperties

public java.util.Properties getProperties()
Returns all the Properties of this SnmpNode object. Here, "all the properties" implies, the properties of this object, the properties of the super classes of this object, and the user-properties that were assigned to this object. Derived classes should override this method and invoke the super.getProperties() in the begining of this method to get the properties of the super class and all the userProperties of this object.
Overrides:
getProperties in class Node
Returns:
The values of the following fields of this class and the values of all the fields of its super classes in a java.util.Properties object.
 
 hostNetmask, sysDescr, sysName, sysOID and all the properties of this 
 object's super classes.
  
See Also:
ManagedObject.getProperties(), setProperties(java.util.Properties)

checkDHCPNodeStatus

protected int checkDHCPNodeStatus()
The checkDHCPNodeStatus method is invoked during status polling for DHCP client objects. The default implementation of this method verifies if the IPAddress of the dhcp object(SnmpNode) in the database and in the device are alike(In a DHCP environment, there is a possibility of IP change between status polls). If there has been a change, the current object will be unmanaged and its IpAddress will be changed to 0.0.0.0. A new node with the new IP got will be added to database. If, there has been an IP change and the node gets unmanaged, this method will return -1 which is the com.adventnet.nms.severity.SeverityInfo#SpecialPurposeSeverity. Else, it will return TopoObject.PROCEEDSTATUSPOLL
Overrides:
checkDHCPNodeStatus in class Node
Returns:
an int value
See Also:
Node.checkDHCPNodeStatus()

AdventNet Web NMS 4 API Specification