"WEBNMS_5 API Docs"

com.adventnet.nms.topodb
Class Network

java.lang.Object
  extended by com.adventnet.nms.topodb.ManagedObject
      extended by com.adventnet.nms.topodb.TopoObject
          extended by com.adventnet.nms.topodb.Network
All Implemented Interfaces:
DBExtendedInterface, DBInterface, ContainerInterface, com.adventnet.nms.topodb.corba.ManagedObject_CIOperations, com.adventnet.nms.topodb.corba.Network_CIOperations, com.adventnet.nms.topodb.corba.TopoObject_CIOperations, java.io.Serializable, java.lang.Cloneable

public class Network
extends TopoObject
implements ContainerInterface, com.adventnet.nms.topodb.corba.Network_CIOperations

This class extends the TopoObject class and represents an IP network or sub-network. This class has "Discover" property to check whether the discovery for a particular Network is to be performed. It also has fields to indicate the status of the Discovery process.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.adventnet.nms.topodb.TopoObject
PROCEEDSTATUSPOLL
 
Constructor Summary
Network()
          Constructor to instantiate a Network object The classname, isNetwork, tester(max), netmask(255.255.255.0) and type(Network) properties of Managed Object is set using this constructor.
Network(java.lang.String netaddr, java.lang.String mask)
          Constructor to instantiate a Network object with the Ipaddress and the netmask arguments.
Network(java.lang.String netaddr, java.lang.String mask, java.lang.String domainName)
          Constructor to instantiate a Network object with the Ipaddress and the netmask arguments.
Network(TopoObject o)
          Constructor to instantiate a new Network object from an existing network object.
 
Method Summary
 com.adventnet.nms.topodb.corba.SeverityStateEnum checkStatus_CT()
          corba: Network_CIOperations interface method.
protected  int checkStatus()
          This method is called to check the status of the object.
 java.lang.Object clone()
          Returns a cloned copy of the Network object.
 boolean getDiscover()
          Gets whether discovery is being done on this network or not.
 int getDiscoveryStatus()
          Gets the discovery status for the network.
 java.lang.String getDiscoveryStringStatus()
          Gets the discovery status for the network as a string.
 java.lang.String getParentNetmask()
          Gets the Parent Netmask for the given Network object.
 java.lang.String getParentNetwork()
          Gets the Parent Network for the given Network object.
 com.adventnet.nms.common.corba.Property_CT[] getProperties_CT()
          corba: Network_CIOperations interface method.
 java.util.Properties getProperties()
          Returns the Properties of the Network object.
 com.adventnet.nms.topodb.corba.SeverityStateEnum getStatus_CT()
          corba: Network_CIOperations interface method.
 java.lang.String[] getSubNetMasks_CT()
          corba: Network_CIOperations interface method.
 java.util.Vector getSubNetMasks()
          Gets the list of netmasks of all Sub Nets of this Network.
 java.lang.String[] getSubNets_CT()
          corba: Network_CIOperations interface method.
 java.util.Vector getSubNets()
          Gets the list of SubNets of this Network.
 NetworkTieRefHolder getTieRefHolder_Network()
          corba: To get the tie ref holder for the object.
 com.adventnet.nms.common.corba.Property_CT[] getUserProperties_CT()
          corba: Network_CIOperations interface method.
 void setDiscover(boolean discover)
          Sets whether discovery is being done on this network or not.
 void setDiscoveryStatus(int discoveryStatus)
          Sets the discovery status for the network.
 void setParentNetmask(java.lang.String net)
          Sets the given Netmask as the Parent Netmask for this Network.
 void setParentNetwork(java.lang.String net)
          Sets the given Network as the Parent Network for this Network object.
 void setProperties_CT(com.adventnet.nms.common.corba.Property_CT[] propertyList)
          corba: Network_CIOperations interface method.
 void setProperties(java.util.Properties p)
          Sets the Network object's properties.
 void setSubNetMasks_CT(java.lang.String[] subnetmasks)
          corba: Network_CIOperations interface method.
 void setSubNetMasks(java.util.Vector subNetMasks)
          Sets the list of netmasks of all Sub Nets of this Network.
 void setSubNets_CT(java.lang.String[] subNets)
          corba: Network_CIOperations interface method.
 void setSubNets(java.util.Vector subNets)
          Sets The list of Sub Nets of this Network.
 
Methods inherited from class com.adventnet.nms.topodb.TopoObject
checkDHCPNodeStatus, 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

Network

public Network()
Constructor to instantiate a Network object The classname, isNetwork, tester(max), netmask(255.255.255.0) and type(Network) properties of Managed Object is set using this constructor.


Network

public Network(java.lang.String netaddr,
               java.lang.String mask)
Constructor to instantiate a Network object with the Ipaddress and the netmask arguments. The Network address given in the argument is set as the name for the Network object. Also the type, classname, tester and isNetwork properties of MO are set using this constructor.

Parameters:
netaddr - The Network address of this network.
mask - The netmask of this network.

Network

public Network(java.lang.String netaddr,
               java.lang.String mask,
               java.lang.String domainName)
Constructor to instantiate a Network object with the Ipaddress and the netmask arguments. The Network address given in the argument is set as the name for the Network object. Also the type, classname, tester and isNetwork properties of MO are set using this constructor.

Parameters:
netaddr - The Network address of this network.
mask - The netmask of this network.
domainName - The domainName of this network.

Network

public Network(TopoObject o)
Constructor to instantiate a new Network object from an existing network object. This constructs the network object with the same properties as the argument.

Parameters:
o - Existing Network object
Method Detail

setParentNetwork

public void setParentNetwork(java.lang.String net)
Sets the given Network as the Parent Network for this Network object. During the discovery process if the NMS finds a parent Network for this network, it sets this property to the value of the parent network. This is mainly to identify the subnets of a particular network. For instance, 192.168.0.0(255.255.0.0) is the parent network of 192.168.3.0(255.255.255.0).

Parameters:
net - The Network which is to be set as the Parent Network.
See Also:
getParentNetwork()

getParentNetwork

public java.lang.String getParentNetwork()
Gets the Parent Network for the given Network object. Returns an empty string if there is no parent network.

Returns:
The parent network for the given Network object.
See Also:
setParentNetwork(java.lang.String)

setParentNetmask

public void setParentNetmask(java.lang.String net)
Sets the given Netmask as the Parent Netmask for this Network. During the discovery process if the NMS finds a parent Network for this network, it sets this property to the netmask of the parent network.

Parameters:
net - The Netmask which is to be set as the Parent Netmask.
See Also:
getParentNetmask()

getParentNetmask

public java.lang.String getParentNetmask()
Gets the Parent Netmask for the given Network object. This ia defined only if parent network exists for this network.

Returns:
The Parent Netmask for the given Network object
See Also:
setParentNetmask(java.lang.String)

getDiscover

public boolean getDiscover()
Gets whether discovery is being done on this network or not. This field is attached to the managed field of the ManagedObject, (i.e.) when managed is "false", this field has to be "false" and when managed is "true", this field can either be "true" or "false".

Specified by:
getDiscover in interface com.adventnet.nms.topodb.corba.Network_CIOperations
Returns:
"true" or "false" depending on whether discovery is being done on this network or not.
See Also:
ManagedObject.getManaged(), setDiscover(boolean)

setDiscover

public void setDiscover(boolean discover)
Sets whether discovery is being done on this network or not. This field is attached to the managed field of the ManagedObject, (i.e.) when managed is "false", this field has to be "false" and when managed is "true", this field can either be "true" or "false". Only when both the properties are true, discovery will be done for the network.

Specified by:
setDiscover in interface com.adventnet.nms.topodb.corba.Network_CIOperations
Parameters:
discover - the boolean value that needs to be set which would state the manage status of the Network.
See Also:
ManagedObject.setManaged(boolean), getDiscover()

getSubNets

public java.util.Vector getSubNets()
Gets the list of SubNets of this Network. This field contains all the addresses of the subnetworks which have been added by the WebNMS system. Subnetwork is the network within a network. This field and subnetmask field go together.

Returns:
Vector of all the sub networks of this network that has been added to the Topology Database.
See Also:
getSubNetMasks(), setSubNets(java.util.Vector)

setSubNets

public void setSubNets(java.util.Vector subNets)
Sets The list of Sub Nets of this Network. This field contains all the addresses of the subnetworks which have been added by the WebNMS system. This field and subnetmask field go together. For instance, the network 192.168.3.0 is a subnet of 192.168.0.0.

Parameters:
subNets - Vector of all the sub networks of this network that has been added to the Topology Database.
See Also:
setSubNetMasks(Vector), getSubNets()

getSubNetMasks

public java.util.Vector getSubNetMasks()
Gets the list of netmasks of all Sub Nets of this Network. This field and subNets field go together.

Returns:
Vector of all the sub netmasks of all the subnets of this network added by the WebNMS system to the Topology Database.
See Also:
getSubNets(), setSubNetMasks(java.util.Vector)

setSubNetMasks

public void setSubNetMasks(java.util.Vector subNetMasks)
Sets the list of netmasks of all Sub Nets of this Network. This field and subNets field go together. This is defined only if the network has subnets.

Parameters:
subNetMasks - Vector of all the sub netmasks of all the subnets of this network added by the WebNMS system to the Topology Database.
See Also:
setSubNets(Vector), getSubNetMasks()

getDiscoveryStatus

public int getDiscoveryStatus()
Gets the discovery status for the network. In order to indicate the discovery status of a network, the network object has this property. This property can take one of the following values:
   1 - YET_TO_BEGIN
   2 - IN_PROGRESS
   3 - FINISHED
   4 - DISCOVERY_DISABLED  ( takes this value if either getDiscover() is "false" 
                             or ManagedObject.getManaged() is "false".)
 
The Default value for discoverystatus of a network is YET_TO_BEGIN

Returns:
The value of discoveryStatus of a network as an integer.
See Also:
getDiscoveryStringStatus(), setDiscoveryStatus(int)

setDiscoveryStatus

public void setDiscoveryStatus(int discoveryStatus)
Sets the discovery status for the network. This value is set by the NMS during the discovery, when it is complete, etc. Hence, it is advisable that the user does not modify this property. It checks the validity of the value and sets it only if the value is between 0-5.

Parameters:
discoveryStatus - The discoveryStatus of a network as an integer.
See Also:
getDiscoveryStatus()

getDiscoveryStringStatus

public java.lang.String getDiscoveryStringStatus()
Gets the discovery status for the network as a string. In order to indicate the discovery status of a network, the network object has this property. This method can return one of the following strings depending upon the discoveryStatus value:
   1 - YET_TO_BEGIN
   2 - IN_PROGRESS
   3 - FINISHED
   4 - DISCOVERY_DISABLED  ( takes this value if either DISCOVER is "false" or MANAGED is "false".)
 

Returns:
The value of discoveryStatus corresponding to the integer value as a string. It returns the default value (YET_TO_BEGIN) when, no value is set.
See Also:
getDiscoveryStatus()

getProperties

public java.util.Properties getProperties()
Returns the Properties of the Network object. Derived classes should override this method and invoke the super.getProperties() in the begining of this method.

Specified by:
getProperties in interface DBInterface
Overrides:
getProperties in class TopoObject
Returns:
The values of the following fields of this class and all its super classes in a Property object.
 
        NodeList, InterfaceList, discover, discoveryStatus, subNets, subNetNetmasks
        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 a cloned copy of the Network 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)
Sets the Network object's properties. The name of an object cannot be changed using this method. Derived Classes should override this method and invoke super.setProperties() at the end of this method. If the Object is to be updated in the database, the TopoAPI.updateObject() method should be invoked after doing the setProperties() on the object.

Specified by:
setProperties in interface DBInterface
Overrides:
setProperties in class TopoObject
Parameters:
p - The values of the fields of this class and all its super classes.
 
        NodeList, InterfaceList, discover, discoveryStatus, subNets, subNetNetmasks
        and all the properties of this object's super classes.
  
See Also:
ManagedObject.setProperties(Properties), getProperties()

checkStatus

protected int checkStatus()
                   throws java.rmi.RemoteException
This method is called to check the status of the object. It returns the new status of this object.The status checking is done by doing the test specified by the tester property. This method returns the status of the object after the test is run. This method performs ping, snmpping if the tester is set to the corresponding values. If set to "max", it updates the status according the status of its interfaces.

Overrides:
checkStatus in class ManagedObject
Returns:
the status of the object as an integer.
Throws:
java.rmi.RemoteException - if any error occurs.

getSubNetMasks_CT

public java.lang.String[] getSubNetMasks_CT()
corba: Network_CIOperations interface method. Used in NMS for corba related operations.

Specified by:
getSubNetMasks_CT in interface com.adventnet.nms.topodb.corba.Network_CIOperations
See Also:
setSubNetMasks_CT(java.lang.String[])

getSubNets_CT

public java.lang.String[] getSubNets_CT()
corba: Network_CIOperations interface method. Used in NMS for corba related operations.

Specified by:
getSubNets_CT in interface com.adventnet.nms.topodb.corba.Network_CIOperations
See Also:
setSubNets_CT(java.lang.String[])

checkStatus_CT

public com.adventnet.nms.topodb.corba.SeverityStateEnum checkStatus_CT()
corba: Network_CIOperations interface method. Used in NMS for corba related operations.

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: Network_CIOperations interface method. Used in NMS for corba related operations.

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: Network_CIOperations interface method. Used in NMS for corba related operations.

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: Network_CIOperations interface method. Used in NMS for corba related operations.

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: Network_CIOperations interface method. Used in NMS for corba related operations.

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[])

setSubNets_CT

public void setSubNets_CT(java.lang.String[] subNets)
corba: Network_CIOperations interface method. Used in NMS for corba related operations.

Specified by:
setSubNets_CT in interface com.adventnet.nms.topodb.corba.Network_CIOperations
See Also:
getSubNets_CT()

setSubNetMasks_CT

public void setSubNetMasks_CT(java.lang.String[] subnetmasks)
corba: Network_CIOperations interface method. Used in NMS for corba related operations.

Specified by:
setSubNetMasks_CT in interface com.adventnet.nms.topodb.corba.Network_CIOperations
See Also:
getSubNetMasks_CT()

getTieRefHolder_Network

public NetworkTieRefHolder getTieRefHolder_Network()
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.