AdventNet Web NMS 4 API Specification

com.adventnet.nms.fe.topo.ejb
Interface TopoSessionRemote

All Superinterfaces:
CustomSessionRemote, javax.ejb.EJBObject, java.rmi.Remote

public interface TopoSessionRemote
extends CustomSessionRemote

This is the "Remote" interface for the TopoSessionBean. Using the TopoSessionBean (the associated EJBean), both CustomView related operations and TopoAPI related operations can be performed.

Since:
Web NMS 2.3
See Also:
CustomSessionRemote

Method Summary
 boolean addNetwork(java.lang.String ticket, java.lang.String network, java.lang.String netmask)
          Adds a network of given IP address and netmask to the topology database and starts off its discovery.
 boolean addNodesToTopoDB(java.lang.String ticket, java.lang.String[] ipAddrs, java.lang.String netmask)
          Discovers and adds nodes of the given list of IP addresses to the database.
 boolean addNodesToTopoDB(java.lang.String ticket, java.lang.String startIpAddr, java.lang.String endIpAddr, java.lang.String netmask)
          Discovers and adds nodes of the given IP address range to the database.
 boolean addNodeToTopoDB(java.lang.String ticket, java.lang.String ipaddr, java.lang.String netmask)
          Discovers and adds a node of the given ip address and netmask to the database.
 boolean addNodeToTopoDB(java.lang.String ticket, java.lang.String ipaddr, java.lang.String netmask, java.lang.String community, int snmpPort)
          Discovers and adds a node of the given IP address, netmask, SNMP community and SNMP port to the database.
 java.lang.String addObjectProperties(java.lang.String ticket, java.util.Properties prop, boolean override, boolean discoveryFlag, boolean reachFlag)
           
 boolean addUserProperty(java.lang.String ticket, java.lang.String key, java.lang.String propKey, java.lang.String propVal)
           
 boolean changeDiscInterval(java.lang.String ticket, java.lang.String net, int seconds)
          To change the Discovery interval.
 boolean changePingRetries(java.lang.String ticket, java.lang.String net, int retries)
          To change the Ping retries.
 boolean changeSnmpRetries(java.lang.String ticket, java.lang.String net, int retries)
          To change the SNMP ping retries.
 boolean deleteObject(java.lang.String ticket, java.lang.String name, boolean deleteTrace)
           
 boolean deleteObjectAndSubElements(java.lang.String ticket, java.lang.String objKey)
          Delete the ManagedObject and all its sub-elements from the data-base.
 boolean dontDiscoverNetwork(java.lang.String ticket, java.lang.String network, java.lang.String netmask)
          Mark the network as not to be discovered in the seed file.
 boolean dontDiscoverNode(java.lang.String ticket, java.lang.String ip, java.lang.String mask)
          Mark the node as not to be discovered in the seed file.
 java.util.Vector getCompleteList(java.lang.String ticket)
           
 java.util.Properties getDiscoveryParameters(java.lang.String ticket)
          Gets the current value of the various discovery parameters.
 java.util.Vector getGroupNames(java.lang.String ticket)
          Gets the names of all the ManagedGroupObjects in the database.
 java.lang.String[] getGroupNamesOfMO(java.lang.String ticket, java.lang.String name)
          Gets the names of groups to which the given ManagedObject belongs.
 java.util.Vector getInterfaces(java.lang.String ticket)
          This method returns the IP addresses of all the interfaces objects in the database, as a vector of strings.
 java.util.Vector getInterfacesOfNetwork(java.lang.String ticket, java.lang.String netName)
          Gets the names of Interfaces objects belonging to the given Network.
 java.util.Vector getInterfacesOfNode(java.lang.String ticket, java.lang.String nodeName)
          Gets the names of Interface objects belonging to the given Node.
 java.lang.String getLocalNetworkAddrs(java.lang.String ticket)
          Gets the local network address.
 java.util.Vector getMembersOfGroup(java.lang.String ticket, java.lang.String groupName)
          Gets the names of ManagedObjects belonging to a particular group.
 java.lang.String[] getMOClassHierarchy(java.lang.String ticket, java.lang.String objKey)
          Get the class hierarchy for the ManagedObject with the given key.
 java.util.Vector getNetworks(java.lang.String ticket)
          This method returns the names of all the Network objects in the database, as a vector of strings.
 java.util.Properties getNodeProperties(java.lang.String ticket, java.lang.String nodeName)
          Gets the properties of the Node object of the given name.
 java.util.Vector getNodes(java.lang.String ticket)
          This method returns the names of all the Node objects in the database, as a vector of strings.
 java.util.Vector getNodesOfNetwork(java.lang.String ticket, java.lang.String net)
          Gets the names of Node objects belonging to the given network.
 int getNumInterfaces(java.lang.String ticket)
          Returns the current total number of Interface objects in Topology Database.
 int getNumNetworks(java.lang.String ticket)
          Returns the current total number of Network Objects in Topology Database.
 int getNumNodes(java.lang.String ticket)
          Returns the current total number of Node objects in Topology Database.
 int getNumObjects(java.lang.String ticket)
          Returns the current total number of ManagedObjects in Topology Database.
 java.util.Vector getObjects(java.lang.String ticket, java.lang.String classname, java.util.Properties match)
          Get the Vector of objects matching the given properties.
 java.util.Hashtable getSeedFileParameters(java.lang.String ticket)
          Get the values of various seed file discovery parameters.
 boolean refreshObject(java.lang.String ticket, java.lang.String key, java.util.Properties prop)
           
 boolean removeAddressRangeToDiscover(java.lang.String ticket, java.lang.String startIP, java.lang.String endIP, java.lang.String network, java.lang.String netmask)
          This method could be used to prevent discovery of a range of IpAddresses in a network.
 boolean removeMOFromGroup(java.lang.String ticket, java.lang.String[] names, java.lang.String groupName)
          Dissociates ManagedObjects from their group.
 boolean removeNodeFromTopoDB(java.lang.String ticket, java.lang.String ipaddr)
          Removes the node of the given IP address from the topology database.
 boolean removeNodesFromTopoDB(java.lang.String ticket, java.lang.String[] ipaddrs)
          Removes the nodes of the given list of IP address from the database.
 boolean removeUserProperty(java.lang.String ticket, java.lang.String key, java.lang.String propKey)
           
 boolean setAddressRangeToDiscover(java.lang.String ticket, java.lang.String startIP, java.lang.String endIP, java.lang.String network, java.lang.String netmask)
          Use this method to set the discovery range of a network of given netmask.
 boolean setDiscover(java.lang.String ticket, java.lang.String netwname, boolean discover)
          This method sets/unsets the discover property of the given Network object,if it is present in the database, and accordingly starts or stops discovery for the Network.
 boolean setDiscoveryParameters(java.lang.String ticket, java.util.Properties prop)
          Set values for various discovery parameters.
 boolean setGroupForMembers(java.lang.String ticket, java.lang.String[] memberNames, java.lang.String groupName)
          Associates ManagedObjects of given names to a particular group.
 boolean setGroupsForMO(java.lang.String ticket, java.lang.String name, java.lang.String[] groupNames, boolean append)
          Sets the groups to which a ManagedObject should belong to.
 void setManaged(java.lang.String ticket, java.lang.String name, boolean manage)
          This method sets whether a ManagedObject is to be managed or unmanaged.
 boolean setManaged(java.lang.String ticket, java.lang.String name, boolean manage, java.lang.String all)
           
 boolean updateObjectProperties(java.lang.String ticket, java.util.Properties prop)
           
 boolean updateStatus(java.lang.String ticket, java.lang.String name, int status)
          Updates the status of the specified ManagedObject, to the given status value.
 
Methods inherited from interface com.adventnet.nms.fe.common.ejb.CustomSessionRemote
createCustomView, createCustomView, getAllViewIDsAndProps, getData, getObjectNamesWithProps, getPropertiesOfObject, getTotalCount, getTotalCount, getTotalCount, getViewProperties, modifyCustomView, removeCustomView, renameCustomView, saveViewState
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

updateStatus

public boolean updateStatus(java.lang.String ticket,
                            java.lang.String name,
                            int status)
                     throws java.rmi.RemoteException
Updates the status of the specified ManagedObject, to the given status value. The first argument is the name of the ManagedObject whose status is to be updated and the second argument is the value of the status. This method notifies all the TopoObservers about the status change of the ManagedObject. This method will also trigger an immediate status polling for the object's parent objects, which might result in a status change for those objects too. All the changes are immediately updated in the database.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
name - The name of the ManagedObject whose status is to be updated.
status - The new status value of the ManagedObject.
Returns:
true if the operation was successful, false otherwise.

setDiscover

public boolean setDiscover(java.lang.String ticket,
                           java.lang.String netwname,
                           boolean discover)
                    throws java.rmi.RemoteException
This method sets/unsets the discover property of the given Network object,if it is present in the database, and accordingly starts or stops discovery for the Network. This method can take effect only if the Network Object is being currently managed (i.e. it's managed property is set to true). The method will not do anything, if the Network Object is unmanaged. This method notifies all TopoObservers of the change in the discover property of the Network.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
netwname - The name of the Network Object.
discover - true - to start discovery, false - to stop discovery.
Returns:
true, if the operation is successful false, if the object is not present or if the network is not managed or if tried to set discover attribute to it's old value.

setManaged

public void setManaged(java.lang.String ticket,
                       java.lang.String name,
                       boolean manage)
                throws java.rmi.RemoteException
This method sets whether a ManagedObject is to be managed or unmanaged. The sub-elements of this ManagedObject will not be affected by this method. For example, if a Node object is set to unmanaged by this method, then the corresponding interface objects will not be affected at all. For Network objects, this method will also update their discover property depending on whether they are set to managed or unmanaged. This method notifies all TopoObservers of the change in the managed property of the ManagedObject.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
name - The name of the ManagedObject.
manage - true - to make the object managed, false - to make the object unmanaged.

getNetworks

public java.util.Vector getNetworks(java.lang.String ticket)
                             throws java.rmi.RemoteException
This method returns the names of all the Network objects in the database, as a vector of strings.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
Vector of strings, containing all the Network names in the database.

getNodes

public java.util.Vector getNodes(java.lang.String ticket)
                          throws java.rmi.RemoteException
This method returns the names of all the Node objects in the database, as a vector of strings.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
Vector of strings, containing all the node names in the database.

getInterfaces

public java.util.Vector getInterfaces(java.lang.String ticket)
                               throws java.rmi.RemoteException
This method returns the IP addresses of all the interfaces objects in the database, as a vector of strings.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
Vector of strings, containing the IP addresses of all the interface objects in the database.

getLocalNetworkAddrs

public java.lang.String getLocalNetworkAddrs(java.lang.String ticket)
                                      throws java.rmi.RemoteException

Gets the local network address.

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
String containing the local network address

getObjects

public java.util.Vector getObjects(java.lang.String ticket,
                                   java.lang.String classname,
                                   java.util.Properties match)
                            throws java.rmi.RemoteException
Get the Vector of objects matching the given properties. This method serves as an RMI interface for the getObjects method of the com.adventnet.nms.store.relational.CommonTopoToRelational class.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
See Also:
com.adventnet.nms.store.relational.CommonTopoToRelational#getObjects(String, Properties)

getNumObjects

public int getNumObjects(java.lang.String ticket)
                  throws java.rmi.RemoteException
Returns the current total number of ManagedObjects in Topology Database.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
The total number of ManagedObjects in the topology database.

getNumNetworks

public int getNumNetworks(java.lang.String ticket)
                   throws java.rmi.RemoteException
Returns the current total number of Network Objects in Topology Database.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
The total number of Network Objects in the topology database.

getNumNodes

public int getNumNodes(java.lang.String ticket)
                throws java.rmi.RemoteException
Returns the current total number of Node objects in Topology Database.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
The total number of Node Objects in the topology database.

getNumInterfaces

public int getNumInterfaces(java.lang.String ticket)
                     throws java.rmi.RemoteException
Returns the current total number of Interface objects in Topology Database.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
The total number of IpAddress Objects in the topology database.

getNodeProperties

public java.util.Properties getNodeProperties(java.lang.String ticket,
                                              java.lang.String nodeName)
                                       throws java.rmi.RemoteException
Gets the properties of the Node object of the given name.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
nodeName - Name of the Node object whose properties are to be obtained.
Returns:
The properties of the specified Node as a Properties object.

getNodesOfNetwork

public java.util.Vector getNodesOfNetwork(java.lang.String ticket,
                                          java.lang.String net)
                                   throws java.rmi.RemoteException
Gets the names of Node objects belonging to the given network.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
net - Name of the Network object for which the list of Node object names is to be obtained.
Returns:
A Vector of Strings containing the names of all the node objects belonging to the given network.

getInterfacesOfNode

public java.util.Vector getInterfacesOfNode(java.lang.String ticket,
                                            java.lang.String nodeName)
                                     throws java.rmi.RemoteException
Gets the names of Interface objects belonging to the given Node.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
nodeName - Name of the Node object for which the list of Interface object names is to be obtained.
Returns:
A vector of Strings containing the names of all the interface objects belonging to the given node.

getInterfacesOfNetwork

public java.util.Vector getInterfacesOfNetwork(java.lang.String ticket,
                                               java.lang.String netName)
                                        throws java.rmi.RemoteException
Gets the names of Interfaces objects belonging to the given Network.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
netName - Name of the Network object for which the list of Interface object names is to be obtained.
Returns:
A vector of Strings containing the names of all the interface objects belonging to the given network.

addNodeToTopoDB

public boolean addNodeToTopoDB(java.lang.String ticket,
                               java.lang.String ipaddr,
                               java.lang.String netmask)
                        throws java.rmi.RemoteException
Discovers and adds a node of the given ip address and netmask to the database. This method internally makes use of the TopoAPI method addNode(ManagedObject obj) to discover and add the node to the database.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
ipaddr - IpAddress of the node to be added.
netmask - Netmask of the network to which this node belongs.
Returns:
true on successfully adding the node, false otherwise.

addNodeToTopoDB

public boolean addNodeToTopoDB(java.lang.String ticket,
                               java.lang.String ipaddr,
                               java.lang.String netmask,
                               java.lang.String community,
                               int snmpPort)
                        throws java.rmi.RemoteException
Discovers and adds a node of the given IP address, netmask, SNMP community and SNMP port to the database. This method internally makes use of the TopoAPI method addNode(ManagedObject, boolean, boolean) to discover and add the node to the database. This method does not override the seed file constraints, if any, specified for the node but adds the node to the database even if it is not reachable from the NMS server. This method is particularly useful in adding nodes that have SNMP agents with different community or communicate on a different port, than the others.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
ipaddr - IP Address of the node to be added.
netmask - Netmask of the network to which this node belongs.
community - Snmp Community for the node.
portNo - Port number on which to communicate to the SNMP agent of the node.
Returns:
true on successfully adding the node, false otherwise.
See Also:
addNode(ManagedObject, boolean, boolean)

addNodesToTopoDB

public boolean addNodesToTopoDB(java.lang.String ticket,
                                java.lang.String startIpAddr,
                                java.lang.String endIpAddr,
                                java.lang.String netmask)
                         throws java.rmi.RemoteException
Discovers and adds nodes of the given IP address range to the database. Note that the range of IP addresses specified must all belong to the same network, with the specified netmask. This method internally makes use of the TopoAPI method addNodeToTopoDB(String, String) to add the nodes to the database.

Nodes added through this method all go through all the filters and seed file constraints, and hence some of them may not be added to the database. Note that this method tries to add all the nodes specified in the range, and does not return when it encounters any error while adding any of the nodes. This method does not add any node to the database if the specified range is illegal (i.e. end IP address is lower in the specified range than the start IP address).

Also note that this method will return true regardless of nodes getting added to the database. It will only check whether the specified address range belongs to the same network.

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
startIpAddr - Starting IP address of the range of IP addresses to be added to the database.
endIpAddr - End IP address of the range of IP address to be added to the database.
netmask - Netmask of the network to which the IP addresses of the given range all belong.
Returns:
false if the start IP address and the end IP address does not belong to the same network or if the given IP address or the netmask is of invalid format or if the range is illegal, true otherwise.
See Also:
addNodeToTopoDB(String, String), setAddressRangeToDiscover(String, String, String, String), removeAddressRangeToDiscover(String, String, String, String)

addNodesToTopoDB

public boolean addNodesToTopoDB(java.lang.String ticket,
                                java.lang.String[] ipAddrs,
                                java.lang.String netmask)
                         throws java.rmi.RemoteException
Discovers and adds nodes of the given list of IP addresses to the database. Note that the list of IP addresses specified must all belong to the same class of network, with the specified netmask. This method internally makes use of the TopoAPI method addNodeToTopoDB(String, String) to add the nodes to the database.

Nodes added through this method all go through all the filters and seed file constraints, and hence some of them may not be added to the database. Note that this method tries to add all the nodes specified in the list, and does not return when it encounters any error while adding any of the nodes.

Also note that this method will return true regardless of nodes getting added to the database. This method actually does not check whether all the addresses specified in the list belong to the same class of Network (in other words, all the IP addresses specified in the list should have the same netmask), and hence users should take care of this situation themselves.

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
ipAddrs - List of IP addresses of nodes to be added to the database.
netmask - Netmask of the network to which the IP addresses of the given list all belong.
Returns:
true always.
See Also:
addNodeToTopoDB(String, String), setAddressRangeToDiscover(String, String, String, String), removeAddressRangeToDiscover(String, String, String, String)

removeNodeFromTopoDB

public boolean removeNodeFromTopoDB(java.lang.String ticket,
                                    java.lang.String ipaddr)
                             throws java.rmi.RemoteException
Removes the node of the given IP address from the topology database. This method would delete the interface object corresponding to the given IP address and would delete the parentNode object only if no other interface exists for that parentNode.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
ipaddr - IP address of the Node object to be deleted.
Returns:
true if the operation was successful, false otherwise.

removeNodesFromTopoDB

public boolean removeNodesFromTopoDB(java.lang.String ticket,
                                     java.lang.String[] ipaddrs)
                              throws java.rmi.RemoteException
Removes the nodes of the given list of IP address from the database. This method internally makes use of removeNodeFromTopoDB(String) TopoAPI method to delete the nodes and it's corresponding interface objects.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
ipaddrs - List of IP address of the Node objects to be deleted.
Returns:
true if the operation was successful, false if the input is null or empty.

getGroupNames

public java.util.Vector getGroupNames(java.lang.String ticket)
                               throws java.rmi.RemoteException
Gets the names of all the ManagedGroupObjects in the database.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
A vector of Strings where the Strings would be the names of all the ManagedGroupObjects.

getMembersOfGroup

public java.util.Vector getMembersOfGroup(java.lang.String ticket,
                                          java.lang.String groupName)
                                   throws java.rmi.RemoteException
Gets the names of ManagedObjects belonging to a particular group. Returns null when no ManagedGroupObject of the given name exists.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
groupName - Name of the ManagedObject group for which the members are to be obtained.
Returns:
A vector of Strings where the Strings would be the names of all the ManagedObjects belonging to this particular group.

setGroupsForMO

public boolean setGroupsForMO(java.lang.String ticket,
                              java.lang.String name,
                              java.lang.String[] groupNames,
                              boolean append)
                       throws java.rmi.RemoteException
Sets the groups to which a ManagedObject should belong to. Setting the groupNames of the ManagedObject using the setGroupNames method of ManagedObject class and a subsequent call of TopoAPI updateObject over the ManagedObject instance will not bear fruit. Groups of ManagedObjects can be set only using this API.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
name - Name of the ManagedObject to which the groups have to be assigned.
groupNames - Names (one or more) of the ManagedGroupObjects to which this node should be a child.
append - boolean to say whether the given groupNames should override the existing ones or be appended to them.
Returns:
true if the operation was successful, false otherwise.

getGroupNamesOfMO

public java.lang.String[] getGroupNamesOfMO(java.lang.String ticket,
                                            java.lang.String name)
                                     throws java.rmi.RemoteException
Gets the names of groups to which the given ManagedObject belongs.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
name - The name of the ManagedObject whose groups is to be obtained.
Returns:
An array of String with the names of the ManagedGroupObjects to which the given object belongs to.

removeMOFromGroup

public boolean removeMOFromGroup(java.lang.String ticket,
                                 java.lang.String[] names,
                                 java.lang.String groupName)
                          throws java.rmi.RemoteException
Dissociates ManagedObjects from their group. This method will remove the given list of ManagedObjects from the specified group.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
names - Names of ManagedObjects which are to be dissociated from the given group.
groupName - Name of the group from which the given list of ManagedObjects are to be removed.
Returns:
true if the operation was successful, false otherwise.

setGroupForMembers

public boolean setGroupForMembers(java.lang.String ticket,
                                  java.lang.String[] memberNames,
                                  java.lang.String groupName)
                           throws java.rmi.RemoteException
Associates ManagedObjects of given names to a particular group. This method will add the given list of ManagedObjects to the specified group.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
memberNames - Names of ManagedObjects to be associated with the group.
groupName - Name of the ManagedGroupObject.
Returns:
true if the operation was successful, false otherwise.

setAddressRangeToDiscover

public boolean setAddressRangeToDiscover(java.lang.String ticket,
                                         java.lang.String startIP,
                                         java.lang.String endIP,
                                         java.lang.String network,
                                         java.lang.String netmask)
                                  throws java.rmi.RemoteException
Use this method to set the discovery range of a network of given netmask.

Please note that the network is added to the topology database if no such network already exists in the database. After adding the network, discovery of the network starts off in a seperate thread with the restricted given range of ipaddresses. Unlike the addNodesToTopoDB method, this method returns immediately after starting off a discovery thread for the network.

And also note that this method wouldn't affect already discovered nodes. But it can prevent discovery of the nodes which were about to be discovered.

Important Note

The discovery range for the network is written into the seed file for persistence so that the seed file could be edited by the user before restarting the server.

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
startIP - The IP Address from which discovery should start.
endIP - The IP Address from which discovery should end.
network - The IP Address of the network.
netmask - The netmask of the network.
Returns:
true on successfully setting the range of discovery.
See Also:
TopoAPI.removeAddressRangeToDiscover(String, String, String, String), TopoAPI.addNodesToTopoDB(String, String, String), TopoAPI.addNodesToTopoDB(String[], String)

removeAddressRangeToDiscover

public boolean removeAddressRangeToDiscover(java.lang.String ticket,
                                            java.lang.String startIP,
                                            java.lang.String endIP,
                                            java.lang.String network,
                                            java.lang.String netmask)
                                     throws java.rmi.RemoteException
This method could be used to prevent discovery of a range of IpAddresses in a network. Important Note

The discovery range for the network is written into the seed file for persistence so that the seed file could be edited by the user before restarting the server.

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
network - The IP Address of the network.
netmask - The netmask address of the network.
Returns:
true on successfully preventing discovery of the given range of IPs and returns false when no such network exists in the database.
See Also:
TopoAPI.setAddressRangeToDiscover(String, String, String, String), TopoAPI.addNodesToTopoDB(String, String, String), TopoAPI.addNodesToTopoDB(String[], String)

addNetwork

public boolean addNetwork(java.lang.String ticket,
                          java.lang.String network,
                          java.lang.String netmask)
                   throws java.rmi.RemoteException
Adds a network of given IP address and netmask to the topology database and starts off its discovery. This method also adds a TO_DISCOVER net entry for the network in the seed file.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
network - The IPAddress of the network to be added.
netmask - The netmask for the network.
Returns:
true if the operation was successful, false otherwise.

changeDiscInterval

public boolean changeDiscInterval(java.lang.String ticket,
                                  java.lang.String net,
                                  int seconds)
                           throws java.rmi.RemoteException
To change the Discovery interval. This will modify the discovery interval, which is the time in seconds to wait between discovery of two nodes, for the given network. Currently, discovery for all networks will use the seed file value for discovery interval. This method can be used to specify different discovery interval values for different networks at run time. Note that this method does not update the seed file, and hence the change in discovery interval value will not be available across restarts of NMS server.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
net - Network (address) for which the discovery interval is to be changed.
seconds - The value of discovery interval in seconds.
Returns:
true if the operation was successful, false otherwise.
See Also:
setDiscoveryParameters(Properties)

changePingRetries

public boolean changePingRetries(java.lang.String ticket,
                                 java.lang.String net,
                                 int retries)
                          throws java.rmi.RemoteException
To change the Ping retries. This will modify the ping retries, which is the number of consecutive failed ICMP ping attempts to declare that a node is not alive, for the given network. ICMP ping is used both during discovery as well as status polling. Currently, all networks will use the seed file value for ping retries. This method can be used to specify different ping retries values for different networks at run time. Note that this method does not update the seed file, and hence the change in ping retries value will not be available across restarts of NMS server.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
net - Network (address) for which the ping retries is to be changed.
retries - The value of ping retries.
Returns:
true if the operation was successful, false otherwise.
See Also:
setDiscoveryParameters(Properties)

changeSnmpRetries

public boolean changeSnmpRetries(java.lang.String ticket,
                                 java.lang.String net,
                                 int retries)
                          throws java.rmi.RemoteException
To change the SNMP ping retries. This will modify the SNMP ping retries, which is the number of consecutive failed SNMP ping attempts to declare that a SNMP enabled node is not alive, for the given network. SNMP ping is used both during discovery as well as status polling. Currently, all networks will use the seed file value for SNMP ping retries. This method can be used to specify different SNMP ping retries values for different networks at run time. Note that this method does not update the seed file, and hence the change in SNMP ping retries value will not be available across restarts of NMS server.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
net - Network (address) for which the SNMP ping retries is to be changed.
retries - The value of SNMP ping retries.
Returns:
true if the operation was successful, false otherwise.
See Also:
setDiscoveryParameters(Properties)

setDiscoveryParameters

public boolean setDiscoveryParameters(java.lang.String ticket,
                                      java.util.Properties prop)
                               throws java.rmi.RemoteException
Set values for various discovery parameters. This method can set values, for the various discovery engine configuration parameters, at run time. These are actually the parameters that are configurable through the seed file. This method updates the seed file also with the given values. Currently the following discovery parameters can be set using this method.
 DISCOVERY_INTERVAL	Time to wait between discovering nodes, in 
			seconds. 

PING_RETRIES Number of ping retries to be used during discovery.

SNMP_RETRIES Number of snmp query retries to be used during discovery.

SNMP_TIMEOUT Snmp timeout value in seconds for all snmp queries.

DISCOVER Whether automatic discovery is to be done or not.

REDISCOVER_INTERVAL Time between two discoveries for a network, in hours.

HOUR The hour(s) of the day in which discovery for networks is scheduled.

DAY_OF_THE_MONTH The day(s) of the months on which discovery fori networks is scheduled.

DAY_OF_THE_WEEK The day(s) of the week on which discovery for i network is scheduled.

REDISCOVER_ALREADY_DISCOVERED Whether the nodes discovered in the previous disocvery have to discovered in the current discovery or not.

READ_COMMUNITY The SNMP read communities to be used.

WRITE_COMMUNITY The SNMP write communities to be used.

The Properties object passed in as a parameter to this method should hold the configuration parameters and their corresponding values. For instance, the following code sets some of the parameters

 
 	Properties discParams = new Properties();
 	discParams.put("DISCOVERY_INTERVAL", String.valueOf(5)); // Sets the discovery interval to 5 seconds.
 	discParams.put("PING_RETRIES", String.valueOf(1)); // Sets the no. of ping retries as 1.
 	discParams.put("SNMP_RETRIES", String.valueOf(2)); // Sets the no. of ping retries as 2.
 	topoapi.setDiscoveryParameters(discParams);
 
 

Note that any change in the above mentioned parameters will have immediate effect if discovery is currently happening. Otherwise, the changes will be used during next discovery. Any change in value of these parameters will have effect over the discovery process of all the networks. If any one of REDISCOVER_INTERVAL, DAY_OF_THE_WEEK, DAY_OF_THE_MONTH or HOUR parameter is changed, discovery for all networks will be stopped and restarted, after the changes are applied.

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
prop - The Properties object containing the discovery parameters and their corresponding values.
Returns:
true if the operation was successful, false otherwise.
See Also:
getDiscoveryParameters(), getSeedFileParameters

getDiscoveryParameters

public java.util.Properties getDiscoveryParameters(java.lang.String ticket)
                                            throws java.rmi.RemoteException
Gets the current value of the various discovery parameters. This method gets those values as a Properties object. The keys and their values in the Properties object returned would be the following. The values of the properties will be all Strings and users have to type cast the values as specified alongside each property.
 DISCOVERY_INTERVAL	Time to wait between discovering nodes, in 
			seconds (Integer). 

PING_RETRIES Number of ping retries to be used during discovery (Integer).

SNMP_RETRIES Number of snmp query retries to be used during discovery (Integer).

SNMP_TIMEOUT Snmp timeout value in seconds for all snmp queries (Integer).

DISCOVER Whether automatic discovery is to be done or not (Boolean).

REDISCOVER_INTERVAL Time between two discoveries for a network, in hours (Integer).

HOUR The hour(s) of the day in which discovery for networks is scheduled (String).

DAY_OF_THE_MONTH The day(s) of the months on which discovery fori networks is scheduled (String).

DAY_OF_THE_WEEK The day(s) of the week on which discovery for i network is scheduled (String).

REDISCOVER_ALREADY_DISCOVERED Whether the nodes discovered in the previous disocvery have to discovered in the current discovery or not (Boolean).

READ_COMMUNITY The SNMP read communities to be used (String).

WRITE_COMMUNITY The SNMP write communities to be used (String).

For example, the following code snippet demonstrates how this method can be used for getting the discovery parameters.

 
 	Properties prop = topoapi.getDiscoveryParameters ();
	String str = (String) prop.remove ("DISCOVERY_INTERVAL");
	int discInt = (Integer.valueOf (str)).intValue ();
 
 
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
A Properties object with the current values of the various discovery parameters.
See Also:
setDiscoveryParameters(Properties), getSeedFileParameters

dontDiscoverNetwork

public boolean dontDiscoverNetwork(java.lang.String ticket,
                                   java.lang.String network,
                                   java.lang.String netmask)
                            throws java.rmi.RemoteException
Mark the network as not to be discovered in the seed file. This method causes a NOT_TO_DISCOVER net statement to be included in the seed file for the given network, at run time. Note that there would be no effect of this method call in the current run of the NMS server, including rediscovery, and the network will not be discovered only on a subsequent restart of the NMS server.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
network - The IPAddress of the network not to be discovered.
netmask - The Netmask of the network not to be discovered.
Returns:
true if the operation was successful, false otherwise.

dontDiscoverNode

public boolean dontDiscoverNode(java.lang.String ticket,
                                java.lang.String ip,
                                java.lang.String mask)
                         throws java.rmi.RemoteException
Mark the node as not to be discovered in the seed file. This method causes a NOT_TO_DISCOVER ip statement to be included in the seed file for the given node, at run time. Note that if the node was already discovered, then the object will continue to remain in the database. But the node will not be discovered during the rediscovery of the network.
Parameters:
a - String value which gets the userName as ticket for authentication and logging.
ip - The IPAddress of the node not to be discovered.
mask - The Netmask of the node not to be discovered.
Returns:
true if the operation was successful, false otherwise.

getSeedFileParameters

public java.util.Hashtable getSeedFileParameters(java.lang.String ticket)
                                          throws java.rmi.RemoteException
Get the values of various seed file discovery parameters. This method is useful to get discovery parameters from seed file, that are of complex data types (unlike the getDiscoveryParameters() method which is useful for getting values of primitive data types). The following parameters from the seed file are returned in the form of a hashtable. The key to get the property from the hashtable and it's corresponding data type are given below.
 Key			Data Type 

InNets Vector of Strings OutNets Vector of Strings OutNetMasks Vector of Strings InNodes Vector of Strings OutNodes Vector of Strings OutNodeMasks Vector of Strings NodeMasks Vector of Strings Netmasks Vector of Strings Communities Vector of Strings LowVal Hashtable of Vectors of Strings (key : network address) HighVal Hashtable of Vectors of Strings (key : network address) SNMPPort Hashtable of Strings (key : node IP address)

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
Returns:
Hashtable containing the values of various seed file discovery parameters.
See Also:
setDiscoveryParameters(Properties), getDiscoveryParameters()

deleteObjectAndSubElements

public boolean deleteObjectAndSubElements(java.lang.String ticket,
                                          java.lang.String objKey)
                                   throws java.rmi.RemoteException
Delete the ManagedObject and all its sub-elements from the data-base. This method is to be used 'only' for deleting either a Container parent, a Network, or a Group from the database under which case, all their sub-elements would also be deleted. This method cannot be used to delete objects that are other than the above mentioned three cases.(for. eg. this method cannot be used by passing the name of a Node or an Interface that is neither a Container parent nor a Group object) Using the method to delete a Container object (Object implementing com.adventnet.nms.topodb.ContainerInterface) would delete the Container Object and all its first level children from the database. If a Network name is given as a parameter to this method, the Network Object and all the Node and Interface objects belonging to the network would be deleted. If a Group object name(Object implementing GroupInterface) is given as a parameter to this method, the GroupObject and all its Group members would be deleted, irrespective of whether the child objects belong to other groups or not.

The applications that have registered themselves as TopoListeners using TopoAPI.addTopoListener() would be notified about this delete operation by a call to their deletObject() methods. Please note that deletion of objects using this method would not be intimated to the TopoObservers. Hence applications that need to get the notification when deletion of objects is done using this method, have to register themselves as TopoListeners.

Parameters:
a - String value which gets the userName as ticket for authentication and logging.
objKey - The key name of the Object to be deleted.
Returns:
true if the deletion of the object and all its sub-elements is true.
See Also:
TopoListener, addTopoListener(TopoListener listener)

addObjectProperties

public java.lang.String addObjectProperties(java.lang.String ticket,
                                            java.util.Properties prop,
                                            boolean override,
                                            boolean discoveryFlag,
                                            boolean reachFlag)
                                     throws java.rmi.RemoteException

updateObjectProperties

public boolean updateObjectProperties(java.lang.String ticket,
                                      java.util.Properties prop)
                               throws java.rmi.RemoteException

deleteObject

public boolean deleteObject(java.lang.String ticket,
                            java.lang.String name,
                            boolean deleteTrace)
                     throws java.rmi.RemoteException

setManaged

public boolean setManaged(java.lang.String ticket,
                          java.lang.String name,
                          boolean manage,
                          java.lang.String all)
                   throws java.rmi.RemoteException

removeUserProperty

public boolean removeUserProperty(java.lang.String ticket,
                                  java.lang.String key,
                                  java.lang.String propKey)
                           throws java.rmi.RemoteException

addUserProperty

public boolean addUserProperty(java.lang.String ticket,
                               java.lang.String key,
                               java.lang.String propKey,
                               java.lang.String propVal)
                        throws java.rmi.RemoteException

refreshObject

public boolean refreshObject(java.lang.String ticket,
                             java.lang.String key,
                             java.util.Properties prop)
                      throws java.rmi.RemoteException

getCompleteList

public java.util.Vector getCompleteList(java.lang.String ticket)
                                 throws java.rmi.RemoteException

getMOClassHierarchy

public java.lang.String[] getMOClassHierarchy(java.lang.String ticket,
                                              java.lang.String objKey)
                                       throws java.rmi.RemoteException
Get the class hierarchy for the ManagedObject with the given key. This method would return the fully qualified class names of the ManagedObject with the given key and all it's super classes.

The class names will be returned in a String array in the reverse hierarchical order (i.e.) the class name of the ManagedObject with the given key will be at the first position and the base class will be at the last position in the array.

For example, for a ManagedObject which is an instance of SnmpNode the following will be returned :

 
 com.adventnet.nms.topodb.SnmpNode;
 com.adventnet.nms.topodb.Node;
 com.adventnet.nms.topodb.TopoObject;
 com.adventnet.nms.topodb.ManagedObject;
  

Parameters:
objKey - The key of the ManagedObject for which the class hierarchy is to be returned.
Returns:
A String array containing the fully qualified class names of the ManagedObject with the given key and all it's super classes, in the reverse hierarchical order. If the object with the given name does not exist in the database a 'null' will be returned.
Throws:
java.rmi.RemoteException - in case of any error

AdventNet Web NMS 4 API Specification