AdventNet Web NMS 4 API Specification

com.adventnet.nms.topodb
Class Node

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

public class Node
extends TopoObject
implements _Node_CIOperations

This class inherits TopoObject and represents the IP Nodes discovered by the WebNMS system. Fields are defined for this class to identify the interfaces which belong to this Node object, and the parent networks to which this Node belongs.

A Node object can have one or more interfaces. The list of interfaces that a Node Object holds is captured by the "InterfaceList" property. The interfaces of the Node object can belong to different Network. The Networks to which the interfaces of the Node object belongs to is captured by the "parentNets" field of the Node object.

During the discovery process of NMS, if the SNMP queries to the SNMP Agent of the Node fails and a System Ping operation to the Node succeeds, a Node object is added into the database.

See Also:
Serialized Form

Fields inherited from class com.adventnet.nms.topodb.TopoObject
PROCEEDSTATUSPOLL
 
Constructor Summary
Node()
          Constructor to instantiate a Node object.
Node(java.lang.String addr, java.lang.String mask)
          Constructor to instantiate a Node object with the Ipaddress and the netmask arguments.
Node(java.lang.String addr, java.lang.String mask, java.lang.String domainName)
          Constructor to instantiate a Node object with the Ipaddress ,the netmask and the domainName arguments.
 
Method Summary
protected  int checkDHCPNodeStatus()
          The checkDHCPNodeStatus method is invoked during status polling for DHCP client objects.
 SeverityStateEnum checkStatus_CT()
          corba: _NodeObject_CIOperations interface method.
protected  int checkStatus()
          This method is invoked during the StatusPolling of the object to check the status of the object.
 java.lang.Object clone()
          Returns the cloned copy of the Node object.
 java.util.Vector getInterfacesList()
          Gets the list of all current IP interfaces in this node.This method will return pure ipAddresses of the interfaces.
 IpAddress_CI[] getIpaddrs_CT()
          corba: _Node_CIOperations interface method.
 java.util.Vector getIpaddrs()
          Returns the list of interfaces belonging to this Node.
 Network_CI[] getParentNets_CT()
          corba: _Node_CIOperations interface method.
 java.util.Vector getParentNets()
          Returns the list of parent networks for this Node.
 com.adventnet.nms.common.corba.Property_CT[] getProperties_CT()
          corba: _NodeObject_CIOperations interface method.
 java.util.Properties getProperties()
          Returns all the Properties of this Node object.
 SeverityStateEnum getStatus_CT()
          corba: _NodeObject_CIOperations interface method.
 com.adventnet.nms.topodb.NodeTieRefHolder getTieRefHolder_Node()
          corba: To get the tie ref holder for the object.
 com.adventnet.nms.common.corba.Property_CT[] getUserProperties_CT()
          corba: _NodeObject_CIOperations interface method.
 void setIpaddrs_CT(IpAddress_CI[] ipaddrsArray)
          corba: _NodeObject_CIOperations interface method.
 void setIpaddrs(java.util.Vector ipaddrs)
          Sets the given list of names of interfaces as the interfaces belonging to this Node.
 void setParentNets_CT(Network_CI[] parentnetArray)
          corba: _NodeObject_CIOperations interface method.
 void setParentNets(java.util.Vector parentNets)
          Sets the given list of names of networks to be the parent networks for this Node.
 void setProperties_CT(com.adventnet.nms.common.corba.Property_CT[] propertyList)
          corba: _NodeObject_CIOperations interface method.
 void setProperties(java.util.Properties p)
          This method is used to set the properties of this object.
 
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

Node

public Node()
Constructor to instantiate a Node object.

Node

public Node(java.lang.String addr,
            java.lang.String mask)
Constructor to instantiate a Node object with the Ipaddress and the netmask arguments.
Parameters:
addr - Ipaddress of the node.
mask - netmask of the node.

Node

public Node(java.lang.String addr,
            java.lang.String mask,
            java.lang.String domainName)
Constructor to instantiate a Node object with the Ipaddress ,the netmask and the domainName arguments.
Parameters:
addr - Ipaddress of the node.
mask - netmask of the node.
domainName - domainName of the node.
Method Detail

getParentNets

public java.util.Vector getParentNets()
Returns the list of parent networks for this Node.
Returns:
Vector of strings representing the names, which are also the network addresses, of the parent networks of the Node.
See Also:
setParentNets(java.util.Vector)

setParentNets

public void setParentNets(java.util.Vector parentNets)
Sets the given list of names of networks to be the parent networks for this Node.
Parameters:
parentNets - Vector of strings representing the names, which are also the network addresses, of networks to be set as the parent networks of the Node.
See Also:
getParentNets()

getIpaddrs

public java.util.Vector getIpaddrs()
Returns the list of interfaces belonging to this Node.
Returns:
Vector of strings representing the names of the interface objects, corresponding to the interfaces belonging to this Node.
See Also:
setIpaddrs(java.util.Vector), getInterfacesList()

getInterfacesList

public java.util.Vector getInterfacesList()
Gets the list of all current IP interfaces in this node.This method will return pure ipAddresses of the interfaces. If domainName field does not exist, this method will return the ipAddress Vector similar to the getIpaddrs() method. Note: It is not advisable to override this method.This method can be used to get the pure ipAddresses, where the getIpaddrs() method will return the domainName appended along with the ipAddress, if the domainName field is added.
Returns:
Vector of strings representing the names of the interface objects, corresponding to the interfaces belonging to this Node.
See Also:
setIpaddrs(java.util.Vector), getIpaddrs()

setIpaddrs

public void setIpaddrs(java.util.Vector ipaddrs)
Sets the given list of names of interfaces as the interfaces belonging to this Node.
Parameters:
ipaddrs - Vector of strings representing the names of interface objects to be set as belonging to this Node.
See Also:
getIpaddrs()

getProperties

public java.util.Properties getProperties()
Returns all the Properties of this Node 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 TopoObject
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.
 
  InterfaceList, parentNet and all the properties of this object's super 
  classes.
  
See Also:
ManagedObject.getProperties(), setProperties(java.util.Properties)

clone

public java.lang.Object clone()
Returns the cloned copy of the Node object. Super classes should override this method and have their own implementation.
Overrides:
clone in class TopoObject
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 (for example, Node class would get the properties of InterfaceList,parentNet alone) from the Properties object and set them to its corresponding fields. Then the method should remove those properties 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 TopoObject
Parameters:
p - The properties to be set in this object.
 
 InterfaceList, parentNet and any property of its super class.
  
See Also:
ManagedObject.setProperties(Properties), getProperties()

checkStatus

protected int checkStatus()
                   throws java.rmi.RemoteException
This method is invoked during the StatusPolling of the object to check the status of the object.

This method checks for the "tester" value that is set for this object and would perform suitable operations to check the status of the object. A Ping operation or an Snmp-Get operation is performed when the tester value is set to "ping" or "snmpping" respectively. If the tester value is set to "max" then the status of the Node will reflect the maximum severity of the interfaces belonging to this Node object.

If the "tester" value is set to "usertest", this method would instantiate the object of the class specified in the "uClass" field, and would call its corresponding UserTester.test(ManagedObject obj, TopoAPI api) method. After verifying the status of the object, this method returns a suitable integer value representing the object's current status. The status of the object would then be updated to the value returned by this method. A return value of "-1" would signify that there is no difference between the previous and the present status of the object.

Sub-classes may override this method to provide thier own status checking.

Overrides:
checkStatus in class ManagedObject
Returns:
status of the object to be set.
Throws:
java.rmi.RemoteException -  

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(Node) 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 TopoObject
Returns:
an int value
See Also:
checkDHCPNodeStatus()

getIpaddrs_CT

public IpAddress_CI[] getIpaddrs_CT()
corba: _Node_CIOperations interface method.
Specified by:
getIpaddrs_CT in interface _Node_CIOperations
See Also:
setIpaddrs_CT(com.adventnet.nms.topodb.corba.IpAddress_CI[])

getParentNets_CT

public Network_CI[] getParentNets_CT()
corba: _Node_CIOperations interface method.
Specified by:
getParentNets_CT in interface _Node_CIOperations
See Also:
setParentNets_CT(com.adventnet.nms.topodb.corba.Network_CI[])

checkStatus_CT

public SeverityStateEnum checkStatus_CT()
corba: _NodeObject_CIOperations interface method.
Specified by:
checkStatus_CT in interface _ManagedObject_CIOperations
Overrides:
checkStatus_CT in class TopoObject

getStatus_CT

public SeverityStateEnum getStatus_CT()
corba: _NodeObject_CIOperations interface method.
Specified by:
getStatus_CT in interface _ManagedObject_CIOperations
Overrides:
getStatus_CT in class TopoObject

getUserProperties_CT

public com.adventnet.nms.common.corba.Property_CT[] getUserProperties_CT()
corba: _NodeObject_CIOperations interface method.
Specified by:
getUserProperties_CT in interface _ManagedObject_CIOperations
Overrides:
getUserProperties_CT in class TopoObject

setProperties_CT

public void setProperties_CT(com.adventnet.nms.common.corba.Property_CT[] propertyList)
corba: _NodeObject_CIOperations interface method.
Specified by:
setProperties_CT in interface _ManagedObject_CIOperations
Overrides:
setProperties_CT in class TopoObject
See Also:
getProperties_CT()

getProperties_CT

public com.adventnet.nms.common.corba.Property_CT[] getProperties_CT()
corba: _NodeObject_CIOperations interface method.
Specified by:
getProperties_CT in interface _ManagedObject_CIOperations
Overrides:
getProperties_CT in class TopoObject
See Also:
setProperties_CT(com.adventnet.nms.common.corba.Property_CT[])

setIpaddrs_CT

public void setIpaddrs_CT(IpAddress_CI[] ipaddrsArray)
corba: _NodeObject_CIOperations interface method.
Specified by:
setIpaddrs_CT in interface _Node_CIOperations
See Also:
getIpaddrs_CT()

setParentNets_CT

public void setParentNets_CT(Network_CI[] parentnetArray)
corba: _NodeObject_CIOperations interface method.
Specified by:
setParentNets_CT in interface _Node_CIOperations
See Also:
getParentNets_CT()

getTieRefHolder_Node

public com.adventnet.nms.topodb.NodeTieRefHolder getTieRefHolder_Node()
corba: To get the tie ref holder for the object.
Returns:
the tie ref holder

AdventNet Web NMS 4 API Specification