"WEBNMS_5 API Docs"

com.adventnet.nms.topodb
Class IpAddress

java.lang.Object
  extended by com.adventnet.nms.topodb.ManagedObject
      extended by com.adventnet.nms.topodb.TopoObject
          extended by com.adventnet.nms.topodb.IpAddress
All Implemented Interfaces:
DBExtendedInterface, DBInterface, com.adventnet.nms.topodb.corba.IpAddress_CIOperations, com.adventnet.nms.topodb.corba.ManagedObject_CIOperations, com.adventnet.nms.topodb.corba.TopoObject_CIOperations, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
SnmpInterface, TL1Interface

public class IpAddress
extends TopoObject
implements com.adventnet.nms.topodb.corba.IpAddress_CIOperations

This class inherits TopoObject and represents an IP Interface. IPAddress objects are created during IP discovery, one for each IP enabled interface. The objects of this class are used to model each of the interface cards present in a Node. The name of this object is of the format "IF-"[DNS name of its ParentNode].

If a given Node object has more than one interface card, then each of the interface cards would be represented by an IpAddress object. Under such a case, one of the IpAddress objects would have the name of the format "IF-"[DNS-name of its parentNode] and the others would have their names of the format- "IF-"[Internet Protocol address of the corresponding interface card].

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.adventnet.nms.topodb.TopoObject
PROCEEDSTATUSPOLL
 
Constructor Summary
IpAddress()
          Constructor to instantiate an Interface object.
IpAddress(java.lang.String addr, java.lang.String mask)
          Constructor to instantiate an Interface object with the Ipaddress and the netmask arguments.
IpAddress(java.lang.String addr, java.lang.String mask, java.lang.String domainName)
          Constructor to instantiate an Interface object with the Ipaddress and the netmask arguments.
 
Method Summary
protected  int checkDHCPNodeStatus()
          The checkDHCPNodeStatus method is invoked during status polling of DHCP client objects.
 com.adventnet.nms.topodb.corba.SeverityStateEnum checkStatus_CT()
          corba:ManagedObject_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 IpAddress object.
 java.lang.String getParentNet()
          Returns the name of the network to which this Interface belongs.
 java.lang.String getParentNode()
          Returns the name of the parent Node object of this Interface.
 com.adventnet.nms.common.corba.Property_CT[] getProperties_CT()
          corba: ManagedObject_CIOperations interface method.
 java.util.Properties getProperties()
          Returns all the Properties of this IpAddress (Interface) object.
 com.adventnet.nms.topodb.corba.SeverityStateEnum getStatus_CT()
          corba: ManagedObject_CIOperations interface method.
 IpAddressTieRefHolder getTieRefHolder_IpAddress()
          corba: To get the tie ref holder for the object.
 com.adventnet.nms.common.corba.Property_CT[] getUserProperties_CT()
          corba: ManagedObject_CIOperations interface method.
 void setParentNet(java.lang.String parentNet)
          Sets the given network name to be the parent network for this Interface.
 void setParentNode(java.lang.String parentNode)
          Sets the name of the Parent Node object for this Interface.
 void setProperties_CT(com.adventnet.nms.common.corba.Property_CT[] propertyList)
          corba: ManagedObject_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
addChildrenKey, addChildrenKeys, addGroupMembers, addGroupNames, equals, getChildren, getChildrenKeys, getClassname, getDisplayName, getDynamicUserProperty, getFailureCount, getFailureThreshold, getGroupMembers, getGroupNames, getGroups, getIsContainer, getIsGroup, getKey, getKeyName, getLazyLoaded, getLockId, getManaged, getMappedProperties, getMembers, getMoid, getName, getOwnerName, getParentId, getParentKey, getPollInterval, getShallowProperties, getStatus, getStatus, getStatusChangeTime, getStatusColor, getStatusPollEnabled, getStatusUpdateTime, getTester, getTieRefHolder_ManagedObject, getType, getUClass, getUserProperties, getUserProperty, getUTest, getWebNMS, hashCode, pollStatus, removeChildren, removeChildrenKeys, removeGroupMembers, removeGroupNames, removeUserProperty, setChildren, setChildrenKeys, setClassname, setDisplayName, setDynamicUserProperty, setFailureCount, setFailureThreshold, setGroupMembers, setGroupNames, setGroups, setIsContainer, setIsGroup, setLazyLoaded, setLockId, setManaged, setMappedProperties, setMembers, setName, setObjMoid, setOwnerName, setParentId, setParentKey, setPollInterval, setShallowProperties, setStatus, setStatusChangeTime, setStatusPollEnabled, setStatusUpdateTime, setTester, setType, setUClass, setUserProperty, setUTest, setWebNMS
 
Methods inherited from class java.lang.Object
finalize, getClass, 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, getWebNMS, pollStatus, setFailureThreshold, setGroupNames, setManaged, setName, setPollInterval, setStatus, setStatusChangeTime, setStatusUpdateTime, setTester, setType, setUClass, setWebNMS
 

Constructor Detail

IpAddress

public IpAddress()
Constructor to instantiate an Interface object.


IpAddress

public IpAddress(java.lang.String addr,
                 java.lang.String mask)
Constructor to instantiate an Interface object with the Ipaddress and the netmask arguments.

Parameters:
addr - The ipaddress of this interface.
mask - The netmask of this interface.

IpAddress

public IpAddress(java.lang.String addr,
                 java.lang.String mask,
                 java.lang.String domainName)
Constructor to instantiate an Interface object with the Ipaddress and the netmask arguments.

Parameters:
addr - The ipaddress of this interface.
mask - The netmask of this interface.
domainName - The domainName of this interface.
Method Detail

getParentNode

public java.lang.String getParentNode()
Returns the name of the parent Node object of this Interface. The "parentNode" of an Interface object is the Node to which the Interface object belongs to. For example, if a Node with DNS name- "Node-A" has two interface cards, then each of these interface cards would be modeled as an IpAddress object and would have their "parentNode" value set to "Node-A".

Specified by:
getParentNode in interface com.adventnet.nms.topodb.corba.IpAddress_CIOperations
Returns:
The Node name to which this interface belongs to.
See Also:
setParentNode(java.lang.String)

setParentNode

public void setParentNode(java.lang.String parentNode)
Sets the name of the Parent Node object for this Interface. The "ParentNode" of an Interface object is the Node to which the Interface object belongs to.

Specified by:
setParentNode in interface com.adventnet.nms.topodb.corba.IpAddress_CIOperations
Parameters:
parentNode - The Node name to which this interface belongs to.
See Also:
getParentNode()

getParentNet

public java.lang.String getParentNet()
Returns the name of the network to which this Interface belongs. For example, an interface with Internet Protocol address of 192.168.1.21 and a netmask of 255.255.255.0 would have its "parentNet" value set to "192.168.1.0".

Specified by:
getParentNet in interface com.adventnet.nms.topodb.corba.IpAddress_CIOperations
Returns:
The Network name to which this interface belongs to.
See Also:
setParentNet(java.lang.String)

setParentNet

public void setParentNet(java.lang.String parentNet)
Sets the given network name to be the parent network for this Interface.

Specified by:
setParentNet in interface com.adventnet.nms.topodb.corba.IpAddress_CIOperations
Parameters:
parentNet - The Network name (which is also it's address), to which this interface object belongs to.
See Also:
getParentNet()

getProperties

public java.util.Properties getProperties()
Returns all the Properties of this IpAddress (Interface) 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 & the userProperty.

Specified by:
getProperties in interface DBInterface
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.
 
 parentNet, parentNode 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 IpAddress object. Sub-Classes should override this method and have their own implementation.

Specified by:
clone in interface DBInterface
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 (e.g., IpAddress class would get the properties values of "parentNode" and "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 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.

Specified by:
setProperties in interface DBInterface
Overrides:
setProperties in class TopoObject
Parameters:
p - The properties to be set in this object.
 
 parentNet, parentNode 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 "usertest", this method would instantiate the object of the class specified in the "uClass" field, and would call its corresponding com.adventnet.nms.netwatch.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 of DHCP client objects. The default implementation of this method verifies if the IPAddress of the dhcp object(interface) in the database and in the device are alike(In a DHCP environment, there is a possibility of device IPAddress change between status polls).In this method,
  • If there has been an IP change in the device , the device ManagedObject 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 was no change in the node's IP Address, it returns PROCEEDSTATUSPOLL.
  • In either of the above case, if the tester value was set to 'ping' and if the device was reachable (ie) if 'ping' was successful this method will return a clear status. Else, it will return the severity.

    Note: In cases where the DHCP client's IPAddress does not change frequently, this IP check can be avoided. To avoid IP check for every status poll, this method can be overriden to only return TopoObject.PROCEEDSTATUSPOLL and not do any DHCP specific check.

    Overrides:
    checkDHCPNodeStatus in class TopoObject
    Returns:
    an int value
    See Also:
    SnmpInterface.checkDHCPNodeStatus()

  • checkStatus_CT

    public com.adventnet.nms.topodb.corba.SeverityStateEnum checkStatus_CT()
    corba:ManagedObject_CIOperations interface method.

    Specified by:
    checkStatus_CT in interface com.adventnet.nms.topodb.corba.ManagedObject_CIOperations
    Overrides:
    checkStatus_CT in class TopoObject

    getStatus_CT

    public com.adventnet.nms.topodb.corba.SeverityStateEnum getStatus_CT()
    corba: ManagedObject_CIOperations interface method.

    Specified by:
    getStatus_CT in interface com.adventnet.nms.topodb.corba.ManagedObject_CIOperations
    Overrides:
    getStatus_CT in class TopoObject

    getUserProperties_CT

    public com.adventnet.nms.common.corba.Property_CT[] getUserProperties_CT()
    corba: ManagedObject_CIOperations interface method.

    Specified by:
    getUserProperties_CT in interface com.adventnet.nms.topodb.corba.ManagedObject_CIOperations
    Overrides:
    getUserProperties_CT in class TopoObject

    setProperties_CT

    public void setProperties_CT(com.adventnet.nms.common.corba.Property_CT[] propertyList)
    corba: ManagedObject_CIOperations interface method.

    Specified by:
    setProperties_CT in interface com.adventnet.nms.topodb.corba.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: ManagedObject_CIOperations interface method.

    Specified by:
    getProperties_CT in interface com.adventnet.nms.topodb.corba.ManagedObject_CIOperations
    Overrides:
    getProperties_CT in class TopoObject
    See Also:
    setProperties_CT(com.adventnet.nms.common.corba.Property_CT[])

    getTieRefHolder_IpAddress

    public IpAddressTieRefHolder getTieRefHolder_IpAddress()
    corba: To get the tie ref holder for the object.

    Returns:
    the tie ref holder

    "WEBNMS_5 API Docs"

    Copyright © 2011 ZOHO Corp., All Rights Reserved.