"WEBNMS_5 API Docs"

com.adventnet.nms.poll
Interface PollAPI

All Superinterfaces:
CommonAPI, CommonModuleAPI, java.rmi.Remote
All Known Implementing Classes:
PollMgr

public interface PollAPI
extends CommonAPI

The API interface for accessing, adding, modifying and deleting PolledData objects in the polling engine database. The PollAPI Provides methods for :

PollAPI is accessible either through RMI or directly from the same JVM. When RMI is enabled, i.e. by running RMI registry before the NMS server is started, the PollAPI can be accessed remotely via RMI. It is published with RMI handle /PollAPI on the server.
 

The following code can be used to get the Handle of the PollAPI. import com.adventnet.nms.util.PureServerUtils; import com.adventnet.nms.poll.PollAPI; import java.rmi.Naming; . . . try { if (!PureServerUtils.smallNet) { api = (PollAPI) Naming.lookup("//" + java.net.InetAddress.getLocalHost().getHostName() + "/PollAPI"); } else { api = com.adventnet.nms.poll.Collector.pollmgr; //or use NmsUtil.getAPI("PollAPI"); } } catch (Exception e) { System.err.println("Remote exception: " + e.getMessage()); e.printStackTrace(); }

smallNet is a boolean variable which is used to specify whether the NMS server is started in the same JVM or not.


PollAPI can be also obtained from NmsUtil's getPollAPI() method.


Method Summary
 void addCreateSchema(java.lang.String tableName, java.lang.String schema)
          Adds a new table name and the respective schema to Poll Engine to create this table.
 void addPoll(PolledData pd)
          Adds a PolledData object to the Polling Engine.
 void addPolledData(PolledData pd, boolean passthrofilters)
          Adds a PolledData to the Polling Engine.
 void addPolledDataForMO(ManagedObject mo)
          Adds PolledData to the Polling Engine for the ManagedObject which is passed as a parameter.
 void addPollFilter(java.lang.String className)
          Adds a new poll filter to the Polling Engine.
 void addPollingObject(PollingObject po, boolean updateOldMOs)
          Adds a new PollingObject to the Polling Engine.
 void addProtocolProvider(java.lang.String protocol, ProtocolProvider prov)
          Adds a new ProtocolProvider class for the protocol provided.
 void addReport(ReportObject ro)
          Adds a new report to the Polling Engine.
 boolean addThresholdObject(ThresholdObject obj)
          Adds a ThresholdObject to the Polling Engine.
 PolledData checkOut(java.lang.String key)
          Checks out the PolledData with the given key from the database for writing, with a write lock.
 PolledData checkOut(java.lang.String key, int timeOut)
          Checks out the PolledData with the given key from the database for writing, with a write lock.
 PolledData checkOutIfAvailable(java.lang.String key)
          Checks out the PolledData with the given key from the database for writing, with a write lock.
 boolean checkWritePermission(PolledData obj)
          Checks whether this instance of the PolledData can be written to the database.
 void clearLockForObject(java.lang.String name, int lockType)
          Releases the specified lock type unconditionally for the PolledData with the given name.
 void createTable(java.lang.String tableName)
          Creates the table whose name is given as argument.
 void deletePoll(java.lang.String name)
          Stops data collection for all the PolledData objects whose agent name is the name passed as argument.
 void deletePollFilter(java.lang.String className)
          Deletes an existing poll filter from Poll Engine whose name is passed as an argument.
 void deletePollingObject(java.lang.String name)
          Deletes the PollingObject whose name is passed as a parameter from Polling Engine.
 void deletePropForPollingObject(java.lang.String name, java.lang.String key)
          Deletes a single oid from the PollingObject whose name is passed as a parameter.
 void deleteProtocolProvider(java.lang.String protocol)
          Deletes the provider class defined for this protocol whose name is passed as a parameter to this method.
 void deleteReport(java.lang.String name)
          Deletes an existing report whose name is passed as a parameter.
 boolean deleteThresholdObject(java.lang.String name)
          Deletes the ThresholdObject whose name is passed as a parameter from Polling Engine.
 void deRegister(PollUnitObserver pdObs)
          Deregisters this observer from getting the notifications whenever a PolledData is added/modified/deleted.
 void deregisterForAllData(PollObserver pollob)
          Deregisters the specified PollObserver from being notified when data is collected.
 void deregisterForData(java.lang.String key, PollObserver pollob)
          Deregisters the specified poll observer from being notified.
 void deregisterForDataFromAgent(java.lang.String agent, PollObserver pollob)
          Deregisters the PollObserver from being notified of the data collected from the agent whose name is passed as argument.
 void deregisterPoller(java.lang.String pollerName)
          Deprecated. 
 boolean deregisterRemotePoller(RemotePoller poller)
          Deregisters the RemotePoller from the Poll Engine.
 java.util.Vector fetchPollerSpecificPolldata(java.lang.String name)
          Returns the Vector of PolledData objects for which data collection has to be done by the poller whose name is passed as argument.
 java.util.Vector getActivePollers()
          Returns a Vector of names of all the active pollers at that time.
 java.util.Vector getAllThresholdObjects()
          Returns a Vector containing all the available ThresholdObjects.
 CollectedData getCollectedData(java.lang.String key, java.util.Date date)
          Returns data collected on a particular day for a PolledData object.
 CollectedData getCollectedData(java.lang.String instance, java.lang.String key, java.util.Date date)
          Returns collected data for a particular day for a given index of MultiplePolledData (in order of time of collection) .
 CollectedData getCollectedData(java.lang.String instance, java.lang.String key, long timeStart)
          Returns collected data from a given time timeStart till current time for a particular index of a MultiplePolledData (in order of time of collection) .
 CollectedData getCollectedData(java.lang.String index, java.lang.String key, long timeStart, long timeEnd)
          Returns collected data from timeStart and timeEnd for a given index of MultiplePolledData (in order of time of collection) .
 CollectedData getCollectedValues(java.lang.String key, long timeStart)
          Returns the data collected for the given PolledData object whose key is given and between the start time specified till the current time .
 CollectedData getCollectedValues(java.lang.String key, long timeStart, long timeEnd)
          Returns the data collected for the PolledData object whose key matches with the key passed, and is collected between the specified time.
 java.lang.String getCreateSchema(java.lang.String tableName)
          Returns the schema that is used for creating the table that is specified as argument.
 int getCurrentLockType(PolledData obj)
          Gets the type oflock currently held by the specified instance of the PolledData.
 java.util.Hashtable getDynamicTablesAndSchemas()
          Returns a Hashtable containing a Vetcor dynamic tables names and a hashtable containing its Schema mapping.
 java.util.Vector getInstances(MultiplePolledData mpd)
          Returns all the instance strings of the PolledData as a Vector when the type of the PolledData is multiple (isMultiplePolledData() is true).
 int getNumPollObjects()
          Returns the total number of PolledData objects currently present in the Polling Engine.
 java.util.Vector getObjectPropsWithProps(java.lang.String classname, java.lang.String[] fetchProps, java.util.Properties match, boolean returnAsProps, boolean performOr)
          Gets a Vector containing selective properties of objects matching the given criteria.
 java.util.Vector getObjects(java.lang.String classname, java.util.Properties match)
          Returns a Vector of PolledData objects matching the given properties.
 PolledData getPolledData(java.lang.String key)
          Returns the PolledData for a specific key.
 java.util.Vector getPolledDataForNode(java.lang.String ipaddr)
          Deprecated. as of version Web NMS 2.3 SP7
 java.util.Vector getPolledDataForNodes(java.lang.String[] ipaddrlist)
          Deprecated. as of version Web NMS 2.3 SP7
 java.util.Vector getPolledDataForNodes(java.lang.String startip, java.lang.String endip, java.lang.String netmask)
          Deprecated. as of version Web NMS 2.3 SP7
 PollingObject getPollingObject(java.lang.String name)
          Returns the PollingObject whose name is passed as a parameter.
 java.util.Vector getPollingObjects()
          Returns a Vector of all PollingObjects in Polling Engine.
 boolean getPollingObjectStatus(java.lang.String name)
          returns the status of the PollingObject,whose name is passed as a parameter to this method.
 java.util.Vector getPollsForAgent(java.lang.String agentname)
          Returns the keys of all the PolledData objects configured for an agent.
 java.util.Vector getTableNames()
          Returns a Vector of tables names in which the collected data are stored.
 java.util.Hashtable getThreshHashOfOid()
          Returns a Hashtable containing names of ThresholdObjects associated with oids.
 long getUpdateTime()
          Returns the time at which the Collected data is inserted in the database when the BULK_INSERT_INTERVAL is set to some positive value.This method is used internally by Web NMS.
 boolean isInitialized()
          Returns whether the Poll Engine has been initialized or not.
 boolean isPollerActive(java.lang.String pollerName)
          Returns the status of the remote poller identified by the name given as argument.
 PolledData lock(PolledData obj, int lock_type, int timeout)
          Applies the specified lock to the PolledData.
 void modifyPoll(PolledData pd)
          Deprecated. as of WebNMS2.3 use modifyPoll(PolledData,boolean) instead
 void modifyPoll(PolledData pdata, boolean dealWithLocks)
          Modifies the PolledData whose key matches with the key of PolledData passed as as a parameter .
 void modifyPollingObject(PollingObject po, boolean updateOldMOs)
          Modifies an existing PollingObject.
 void modifyPropForPollingObject(java.lang.String name, java.util.Properties prop, boolean updateMOs)
          modifies properties of a single oid or adds a new oid in the data collection criteria of PollingObject whose of name passed as a parameter.
 boolean modifyThresholdObject(ThresholdObject obj)
          Modifies the ThresholdObject which has been added already.
 void obtainPollerSpecificPolledData(java.lang.String name, long startId)
          This method will be used by Remote pollers.
 void register(PollUnitObserver pdObs)
          Registers for getting the notifications whenever a PolledData is added/modified/deleted.
 void registerForAllData(PollObserver pollob)
          Registers for all data which is collected by the PollEngine.
 void registerForData(java.lang.String key, PollObserver pollob)
          Registers for the data collection done for the PolledData whose key corresponds to the key passed as argument.
 void registerForDataFromAgent(java.lang.String agent, PollObserver pollob)
          Registers for a data collection whenever the data is collected for the agent whose name passed as argument.
 boolean registerPoller(RemotePoller rp, java.lang.String pollerName)
          Deprecated. 
 java.util.Hashtable registerRemotePoller(RemotePoller rp, java.util.Hashtable pollerProps)
          Registers the RemotePoller with the Poll Engine if the Poller is not already registered.
 boolean removePoll(PolledData pd, boolean dealWithLocks)
          Stops polling of the PolledData identified by the key and also deletes the corresponding PolledData object from the polling engine database.
 boolean removePoll(java.lang.String key)
          Deprecated. as of WebNMS2.3 use removePoll(PolledData,boolean) instead
 boolean removePolledDataForNode(java.lang.String ipaddr, java.lang.String key)
          Deprecated. as of version Web NMS 2.3 SP7
 boolean removePolledDataForNodes(java.lang.String[] ipaddr, java.lang.String key)
          Deprecated. as of version Web NMS 2.3 SP7
 boolean removePolledDataForNodes(java.lang.String startip, java.lang.String endip, java.lang.String netmask, java.lang.String key)
          Deprecated. as of version Web NMS 2.3 SP7
 void restart()
          Stops and restarts the data collection .
 boolean resumeAllPollsForAgent(java.lang.String agentname)
          Restarts the data collection for an agent if there are any PolledData objects configured for that agent.
 void scheduleReport(java.lang.String name, long timeval)
          Schedules an existing report to be run at a given time.
 void setDebugMode(boolean debug)
          Sets the debugging to true/false based on which some debugging messages will be printed during data collection.
 boolean setPolledDataForNode(java.lang.String ipaddr, PolledData pd)
          Deprecated. as of version Web NMS 2.3 SP7
 boolean setPolledDataForNodes(java.lang.String[] ipaddrlist, PolledData pd)
          Deprecated. as of version Web NMS 2.3 SP7
 boolean setPolledDataForNodes(java.lang.String startip, java.lang.String endip, java.lang.String netmask, PolledData pd)
          Deprecated. as of version Web NMS 2.3 SP7
 void setPollingObjectStatus(java.lang.String name, boolean status)
          sets status of the PollingObject name to the given value.
 void shutDownAllPollers()
          ShutDown all the remote pollers which are active currently.
 void shutDownPoller(java.lang.String pollerName)
          ShutDown the poller with the name passed as a parameter.
 boolean startDataPoll()
          Starts data collection.
 void stopAll()
          Stops all data collection.
 boolean stopDataPoll()
          Stops data collection.
 boolean suspendAllPollsForAgent(java.lang.String agentname)
          Suspends polling for a particular agent.
 void unlock(PolledData obj)
          Unlocks the specified PolledData.
 void updateNumericTypeOfPd(java.lang.String key, int numericType)
          Updates the numericType property of the PolledData given it's key.
 
Methods inherited from interface com.adventnet.nms.util.CommonAPI
getCompleteList, getObjectNamesWithProps, getPropertiesOfObject
 

Method Detail

isInitialized

boolean isInitialized()
                      throws java.rmi.RemoteException
Returns whether the Poll Engine has been initialized or not. The PollAPI can be used only after it has been initialized.

Returns:
boolean specifying the state .
Throws:
java.rmi.RemoteException - if an exception occurs during remote call

getPolledData

PolledData getPolledData(java.lang.String key)
                         throws UserTransactionException,
                                NmsPollException,
                                java.rmi.RemoteException
Returns the PolledData for a specific key. The key which uniquely identifies the PolledData is passed as an argument. The key for a PolledData pd is
pd.name + "\t" + pd.agent.toLowerCase().trim() + "\t" + pd.oid.

Parameters:
key - The unique key for the PolledData object formed by concatinating name, agent, oid fields of the PolledData object with "\t" as the separator between the fields.
Returns:
returns the PolledData object corresponding to the key.
Throws:
NmsPollException - if any problem while retrieving PolledData
UserTransactionException - if this method is called within a transaction block and if transaction times out.
java.rmi.RemoteException - if an exception occurs during remote call

addPoll

void addPoll(PolledData pd)
             throws java.rmi.RemoteException,
                    UserTransactionException,
                    NmsPollException
Adds a PolledData object to the Polling Engine. This method will start data collection immediately if the PolledData is active (Active property of PolledData can be set to true using setActive(boolean)) else data collection is not started for this PolledData.

Parameters:
pd - The PolledData object to be added.
Throws:
NmsPollException - if ,
  • PolledData with the given key already exists.
  • PolledData key is not formed properly.
  • if dynamic table is not created properly at run time (this is applicable only if dynamic table feature is used). if there is any exception while adding PolledData in non-transaction mode.
UserTransactionException - if there is any exception while doing transaction operations.
java.rmi.RemoteException - if an exception occurs during remote call

addPolledData

void addPolledData(PolledData pd,
                   boolean passthrofilters)
                   throws java.rmi.RemoteException,
                          UserTransactionException,
                          NmsPollException
Adds a PolledData to the Polling Engine. If passthrofilters is true , the added PolledData is passed through the available poll filters , else it is added directly, as in addPoll(PolledData) method.This method gets the parent ManagedObject name from the PolledData itself.(Parent ManagedObject name should be set using setparentObj(String). Using the ManagedObject name, the corresponding ManagedObject is retrieved using getManagedObject(String). If it is obtained, the ManagedObject and the PolledData are passed through the poll filters, else PolledData is added directly without passing it through poll filters.

Parameters:
pd - a PolledData to be added to the system
passthrofilters - a boolean indicating whether to pass through poll filters or not.
Throws:
NmsPollException - if ,
  • there is any exception while passing PolledData through existing PollFilters
  • there is any problem while retrieving the corresponding ManagedObject
  • PolledData with the given key already exists.
  • PolledData key is not formed properly.
  • if dynamic table is not created properly at run time (this is applicable only if dynamic table feature is used). if there is any exception while adding PolledData in non-transaction mode.
UserTransactionException - if there is any exception while doing transaction operations.
java.rmi.RemoteException - if an exception occurs during remote call.
See Also:
PollToTopoIfc.getManagedObject(String)

addPolledDataForMO

void addPolledDataForMO(ManagedObject mo)
                        throws java.rmi.RemoteException,
                               NmsPollException,
                               UserTransactionException
Adds PolledData to the Polling Engine for the ManagedObject which is passed as a parameter. This can be used when the discovery process is not used and the ManagedObjects are not added by using TopoAPI, and PolledData needs to be configured for these ManagedObjects. This ManagedObject is passed through all the PollingObjects and if it satisfies any of the match criteria of PollingObject, PolledDatas are added. These PolledDatas are passed through PollFilters also.

If data collection is using SNMP, an instance of either SnmpNode or SnmpInterface (sub classes of ManagedObject) should be passed to this method. For SnmpNode object,oids of type 'node' or 'multiple' (given in Polling.conf) will be added and for SnmpInterface object 'interface' type oid will be added. The necessary fields which should be set in this case are
name, ipAddress, isDHCP, isNode, isInterface, isSNMP, snmpport (default-161), community(default-public), version, userName and contextName. In this userName and contextName are only applicable only if version is v3.

For other protocols , the ManagedObject passed should be an instance of TopoObject . The necessary fields which should be set in this case are
name,ipAddress,isDHCP

The agent name of the PolledData is set as follows:

  • If isDHCP is set to true, the agent name of the PolledDatas created will be the name of the ManagedObject. If name starts with "IF-" , the agent name is set after removing "IF-".
  • if isDHCP is false, dnsname is obtained using the ipAddress provided and is set as agent names for PolledDatas.

    Parameters:
    mo - ManagedObject for which the PolledData is to be added.
    Throws:
    NmsPollException - if ,
    • there is any problem while retrieving the corresponding ManagedObject
    • PolledData with the given key already exists.
    • PolledData key is not formed properly.
    • if dynamic table is not created properly at run time (this is applicable only if dynamic table feature is used). if there is any exception while adding PolledData in non-transaction mode.
    UserTransactionException - if there is any exception while doing transaction operations.
    java.rmi.RemoteException - if an exception occurs during remote call.
    See Also:
    addPoll(PolledData)

  • deletePoll

    void deletePoll(java.lang.String name)
                    throws UserTransactionException,
                           NmsPollException,
                           java.rmi.RemoteException
    Stops data collection for all the PolledData objects whose agent name is the name passed as argument. It also removes the PolledData objects from the Polling Engine database.

    Parameters:
    name - The agent name of the PolledData object for which data collection is to be stopped and the PolledData objects are to be deleted.
    Throws:
    NmsPollException - if there is any exception while deleting PolledData objects for the agent
    UserTransactionException - if there is any exception while doing transaction operations.
    java.rmi.RemoteException - if an exception occurs during remote call

    removePoll

    boolean removePoll(java.lang.String key)
                       throws NmsPollException,
                              UserTransactionException,
                              java.rmi.RemoteException
    Deprecated. as of WebNMS2.3 use removePoll(PolledData,boolean) instead

    Stops polling of the PolledData identified by the key.It also deletes the corresponding PolledData object from the polling engine database.

    Parameters:
    key - the key of the PolledData which is to be removed.The key is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    Returns:
    boolean specifying the status of the operation .
    Throws:
    UserTransactionException - if there is any exception while doing transaction operations.
    NmsPollException - if there is any problem in deleting the PolledData from the database
    java.rmi.RemoteException - if an exception occurs during remote call

    restart

    void restart()
                 throws java.rmi.RemoteException
    Stops and restarts the data collection . This is a costly process and avoid using this method.

    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    stopAll

    void stopAll()
                 throws java.rmi.RemoteException
    Stops all data collection. This is a costly operation and it is generally not advisable to call this method.

    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    modifyPoll

    void modifyPoll(PolledData pd)
                    throws java.rmi.RemoteException,
                           NmsPollException,
                           UserTransactionException
    Deprecated. as of WebNMS2.3 use modifyPoll(PolledData,boolean) instead

    Modifies the PolledData whose key matches the key of PolledData passed as as a parameter . If the key of the PolledData, passed as the argument, matches that of any other PolledData object already in the database, then that PolledData's properties will be changed to the given PolledData's properties. Else the given PolledData will be added as a new PolledData and polling will be started for this.

    Parameters:
    pd - The PolledData object to be modified.
    Throws:
    UserTransactionException - if there is any exception while doing transaction operations.
    NmsPollException - if ,
    • there is any exception while retrieving PolledData from the database
    • if there is any exception while updating database.
    java.rmi.RemoteException - if an exception occurs during remote call

    registerForData

    void registerForData(java.lang.String key,
                         PollObserver pollob)
                         throws java.rmi.RemoteException
    Registers for the data collection done for the PolledData whose key corresponds to the key passed as argument. This PollObserver will be notified whenever a data is collected for that PolledData.

    Parameters:
    key - The key of the PolledData object whose data will be notified to the PollObserver.
    pollob - The implementing class of the PollObserver which is to be notified of the collected data.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    PollObserver

    deregisterForData

    void deregisterForData(java.lang.String key,
                           PollObserver pollob)
                           throws java.rmi.RemoteException
    Deregisters the specified poll observer from being notified. When deregistered, the PollObserver pollob will no longer be notified of the collected data.The key of the PolledData for which the PollObserver pollob has to be deregistered is passed as argument.

    Parameters:
    key - The key of the PolledData object whose data was notified to the PollObserver which was registered before.
    pollob - The implementing class of PollObserver which has to be deregistered.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    PollObserver

    registerForAllData

    void registerForAllData(PollObserver pollob)
                            throws java.rmi.RemoteException
    Registers for all data which is collected by the PollEngine. This PollObserver will be notified whenever a new data is collected.

    Parameters:
    pollob - The implementing class of PollObserver which is to be notified of the collected data.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    PollObserver

    deregisterForAllData

    void deregisterForAllData(PollObserver pollob)
                              throws java.rmi.RemoteException
    Deregisters the specified PollObserver from being notified when data is collected.

    Parameters:
    pollob - The implementing class of PollObserver which is to be deregistered.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    PollObserver

    registerForDataFromAgent

    void registerForDataFromAgent(java.lang.String agent,
                                  PollObserver pollob)
                                  throws java.rmi.RemoteException
    Registers for a data collection whenever the data is collected for the agent whose name passed as argument. The PollObserver will be notified whenever a data is collected from that agent.

    Parameters:
    agent - The agent name whose data will be notified to the PollObserver.
    pollob - The implementing class of PollObserver which is to be notified of the collected data.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    PollObserver

    deregisterForDataFromAgent

    void deregisterForDataFromAgent(java.lang.String agent,
                                    PollObserver pollob)
                                    throws java.rmi.RemoteException
    Deregisters the PollObserver from being notified of the data collected from the agent whose name is passed as argument.

    Parameters:
    agent - agent name whose data was notified.
    pollob - The implementing class of PollObserver which is to be deregistered.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    PollObserver

    getCollectedData

    CollectedData getCollectedData(java.lang.String key,
                                   java.util.Date date)
                                   throws UserTransactionException,
                                          NmsPollException,
                                          java.rmi.RemoteException
    Returns data collected on a particular day for a PolledData object. The collected data is returned (in order of time of collection) as an instance of CollectedData Object. The key of the PolledData Object whose collected data is to be retrieved and the date are passed as arguments.

    Parameters:
    key - The key of the PolledData Object whose data are required. The key for a PolledData pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    date - The date on which data collected is required. The date is the instance of java.util.Date
    NoteTo retrieve collected data for MultiplePolledData objects use getCollectedData(String,String ,Date)
    Returns:
    CollectedData containing the collected statistics.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving PolledData corresponding to the key passed.
    java.rmi.RemoteException - if an exception occurs during remote call

    getCollectedData

    CollectedData getCollectedData(java.lang.String instance,
                                   java.lang.String key,
                                   java.util.Date date)
                                   throws UserTransactionException,
                                          NmsPollException,
                                          java.rmi.RemoteException
    Returns collected data for a particular day for a given index of MultiplePolledData (in order of time of collection) . This method is used only in case of MultiplePolledDatas. The key of the MultiplePolledData , the index string and the date are passed as arguments.

    Parameters:
    instance - the instance string of the MultiplePolledData for which the data is required.
    key - The key of the PolledData Object whose data are required. The key for a PolledData pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    date - Date on which the data collected are required.
    Returns:
    CollectedData containing the collected statistics.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving PolledData corresponding to the key passed.
    java.rmi.RemoteException - if an exception occurs during remote call

    getCollectedData

    CollectedData getCollectedData(java.lang.String instance,
                                   java.lang.String key,
                                   long timeStart)
                                   throws UserTransactionException,
                                          NmsPollException,
                                          java.rmi.RemoteException
    Returns collected data from a given time timeStart till current time for a particular index of a MultiplePolledData (in order of time of collection) . This is used only in case of MultiplePolledDatas. This method requires the start time in long and it represents time in milliseconds since epoch.

    Parameters:
    instance - instance string of the MultiplePolledData
    key - The key of the PolledData Object whose data are required. The key for a PolledData pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    timeStart - The starting time from when the collected statistic is required. The time is given as a long value and it represents time in milliseconds since epoch.
    Returns:
    CollectedData containing the collected statistics.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving PolledData corresponding to the key passed.
    java.rmi.RemoteException - if an exception occurs during remote call

    getCollectedData

    CollectedData getCollectedData(java.lang.String index,
                                   java.lang.String key,
                                   long timeStart,
                                   long timeEnd)
                                   throws UserTransactionException,
                                          NmsPollException,
                                          java.rmi.RemoteException
    Returns collected data from timeStart and timeEnd for a given index of MultiplePolledData (in order of time of collection) . This is used only in case of MultiplePolledDatas. This method requires the start time and end time as long and both represent time in milliseconds since epoch. This method is used to get the Collected Data when the PolledData is an instance of MultiplePolledData.

    Parameters:
    index - the instance string whose value is needed.
    key - The key of the PolledData Object whose data are required. The key for a PolledData pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    timeStart - The starting time from when the collected data is required. The time is given as a long value and it represents time in milliseconds since epoch.
    timeEnd - The end time until when the collected data is required as long value and it represents time in milliseconds since epoch.
    Returns:
    CollectedData containing the collected statistics.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving PolledData corresponding to the key passed.
    java.rmi.RemoteException - if an exception occurs during remote call

    getInstances

    java.util.Vector getInstances(MultiplePolledData mpd)
                                  throws UserTransactionException,
                                         NmsPollException,
                                         java.rmi.RemoteException
    Returns all the instance strings of the PolledData as a Vector when the type of the PolledData is multiple (isMultiplePolledData() is true). If not returns a Vector containing the string "-1".

    Parameters:
    mpd - MultiplePolledData whose instance strings has to be obtained.
    Returns:
    Vector containing the instances of the mpd as String.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving instances.
    java.rmi.RemoteException - if an exception occurs during remote call

    suspendAllPollsForAgent

    boolean suspendAllPollsForAgent(java.lang.String agentname)
                                    throws UserTransactionException,
                                           NmsPollException,
                                           java.rmi.RemoteException
    Suspends polling for a particular agent. No data will be collected for PolledDatas that belong to this agent until polling is resumed again using resumeAllPollsForAgent(String).

    Parameters:
    agentname - Name of the agent for which data collection has to be suspended.
    Returns:
    false if there are no PolledData object is configured for the agent else true.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while getting the PolledData objects for the agent and modifying their active state to false.
    java.rmi.RemoteException - if an exception occurs during remote call

    resumeAllPollsForAgent

    boolean resumeAllPollsForAgent(java.lang.String agentname)
                                   throws UserTransactionException,
                                          NmsPollException,
                                          java.rmi.RemoteException
    Restarts the data collection for an agent if there are any PolledData objects configured for that agent.

    Parameters:
    agentname - Name of the agent for which data collection are to be resumed.
    Returns:
    false If there are no PolledData objects configured for the agent else true.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while getting the PolledData objects for the agent and modifying their active state to true.
    java.rmi.RemoteException - if an exception occurs during remote call

    getPollsForAgent

    java.util.Vector getPollsForAgent(java.lang.String agentname)
                                      throws UserTransactionException,
                                             NmsPollException,
                                             java.rmi.RemoteException
    Returns the keys of all the PolledData objects configured for an agent. The Key for the PolledData object pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid

    Parameters:
    agentname - Name of the agent whose keys of the PolledData have to be returned.
    Returns:
    Vector of keys of the PolledData objects as String. Empty Vector if there is no PolledData configured for that agent.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception in retrieving PolledData objects for the agent.
    java.rmi.RemoteException - if an exception occurs during remote call

    getObjects

    java.util.Vector getObjects(java.lang.String classname,
                                java.util.Properties match)
                                throws UserTransactionException,
                                       NmsPollException,
                                       java.rmi.RemoteException
    Returns a Vector of PolledData objects matching the given properties. The classname is the name of the class, the objects belong to. It is assumed all objects which match the given criteria are stored in the same set of tables. All returned objects will be instances of the given class name.

    Parameters:
    classname - name of the class the object belongs.
    match - properties which is to be matched with the object's properties.
    Returns:
    Vector of objects whose properties match the properties given.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception in retrieving objects matching the given criteria.
    java.rmi.RemoteException - if an exception occurs during remote call

    getNumPollObjects

    int getNumPollObjects()
                          throws UserTransactionException,
                                 NmsPollException,
                                 java.rmi.RemoteException
    Returns the total number of PolledData objects currently present in the Polling Engine.

    Returns:
    int number of PolledData objects.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while getting the total count.
    java.rmi.RemoteException - if an exception occurs during remote call

    registerPoller

    @Deprecated
    boolean registerPoller(RemotePoller rp,
                                      java.lang.String pollerName)
                           throws java.rmi.RemoteException
    Deprecated. 

    Registers the RemotePoller with the Poll Engine if the Poller is not already registered.

    Parameters:
    rp - RemotePoller which is to be registered with the Poll engine.
    pollerName - Name of the Poller.
    Returns:
    false when the RemotePoller is not registered (i.e., the RemotePoller with the given name is already registered) ,else true.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    registerRemotePoller

    java.util.Hashtable registerRemotePoller(RemotePoller rp,
                                             java.util.Hashtable pollerProps)
                                             throws java.rmi.RemoteException,
                                                    NmsPollException
    Registers the RemotePoller with the Poll Engine if the Poller is not already registered.

    Parameters:
    rp - RemotePoller which is to be registered with the Poll engine.
    pollerProps - Properties about the poller. The property must contain the name of the remote poller, else it will not be registered. The name of the poller must be mapped with 'PollerName' key.
    Returns:
    Properties to be passed to the registered Poller, if it is registered (i.e., the RemotePoller with the given name is not registered) ,else null.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException
    See Also:
    RemotePoller

    deregisterPoller

    @Deprecated
    void deregisterPoller(java.lang.String pollerName)
                          throws java.rmi.RemoteException
    Deprecated. 

    Deregisters the RemotePoller from the Poll Engine.

    Parameters:
    pollerName - Name of the Poller which is to be deregistered.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    deregisterRemotePoller

    boolean deregisterRemotePoller(RemotePoller poller)
                                   throws java.rmi.RemoteException
    Deregisters the RemotePoller from the Poll Engine.

    Parameters:
    poller - Poller instance which has to be deregistered.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    fetchPollerSpecificPolldata

    java.util.Vector fetchPollerSpecificPolldata(java.lang.String name)
                                                 throws java.rmi.RemoteException
    Returns the Vector of PolledData objects for which data collection has to be done by the poller whose name is passed as argument. This method is mainly used to get PolledData Objects whose data collection is done by the Remotepoller.

    Parameters:
    name - Name of the Poller as String.
    Returns:
    Vector of PolledData objects.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    getTableNames

    java.util.Vector getTableNames()
                                   throws java.rmi.RemoteException
    Returns a Vector of tables names in which the collected data are stored. This Vector also contains the dynamic tables.If no table name is explicitly set to any PolledData either through Polling.conf or API,this Vector will contain the default tables names, i.e., STATSDATA% and STRINGDATA%.

    Returns:
    return Vector containing table names as String.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    updateNumericTypeOfPd

    void updateNumericTypeOfPd(java.lang.String key,
                               int numericType)
                               throws UserTransactionException,
                                      NmsPollException,
                                      java.rmi.RemoteException
    Updates the numericType property of the PolledData given it's key. This property represents whether the collected value for the PolledData is numeric or string type. Valid values for numericType are,

    Parameters:
    key - key of the PolledData whose numericType has to be changed. The Key for the PolledData object pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    numericType - value to be set to numericType property of PolledData..
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while updating numeric type field of PolledData.
    java.rmi.RemoteException - if an exception occurs during remote call

    getPolledDataForNode

    java.util.Vector getPolledDataForNode(java.lang.String ipaddr)
                                          throws UserTransactionException,
                                                 NmsPollException,
                                                 java.rmi.RemoteException
    Deprecated. as of version Web NMS 2.3 SP7

    Returns a Vector of PolledData objects configured for a node with the given IP address. The dns name of the node is obtained from the IP address and it is compared with agent names of the existing PolledDatas. The PolledDatas whose agent names match the the dns name are returned .

    Parameters:
    ipaddr - IP address of the node as String.
    Returns:
    Vector containing PolledData objects.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while getting PolledData objects for the node.
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    setPolledDataForNode(java.lang.String, com.adventnet.nms.poll.PolledData)

    getPolledDataForNodes

    java.util.Vector getPolledDataForNodes(java.lang.String[] ipaddrlist)
                                           throws UserTransactionException,
                                                  NmsPollException,
                                                  java.rmi.RemoteException
    Deprecated. as of version Web NMS 2.3 SP7

    Returns a Vector of PolledData objects for a group of nodes. The IP addresses of the nodes are given as argument.The dns names of the nodes are obtained using the IP addresses and each of these dns names are compared with the agent names of the existing PolledDatas.The PolledDatas whose agent name matches any of the dns names are returned.

    Parameters:
    ipaddrlist - IP addresses as String[] array.
    Returns:
    Vector containing PolledData objects of all the nodes whose IP matches with the one in the list.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException
    See Also:
    #setPolledDataForNodes(String[])

    getPolledDataForNodes

    java.util.Vector getPolledDataForNodes(java.lang.String startip,
                                           java.lang.String endip,
                                           java.lang.String netmask)
                                           throws java.rmi.RemoteException,
                                                  NmsPollException,
                                                  UserTransactionException
    Deprecated. as of version Web NMS 2.3 SP7

    Returns a Vector of PolledData objects configured for a set of nodes whose IP addresses falls between startip and endip. The starting and ending IPAddress must belong to same network and the netmask given should be a valid netmask. The dns names of the nodes are obtained using the IP addresses and each of these dns names are compared with the agent names of the existing PolledDatas.The PolledDatas whose agent name matches any of the dns names are returned.

    Parameters:
    startip - The starting ip address as String.
    endip - The ending ip address as String.
    netmask - The netmask as String.
    Returns:
    Vector containing PolledData objects.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException -
    • if an invalid netmask is given
    • if the starting and ending ipaddresses are invalid values
    • if the starting and ending ipaddresses are not in the same network
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    setPolledDataForNodes(String,String,String,PolledData)

    setPolledDataForNode

    boolean setPolledDataForNode(java.lang.String ipaddr,
                                 PolledData pd)
                                 throws java.rmi.RemoteException,
                                        NmsPollException,
                                        UserTransactionException
    Deprecated. as of version Web NMS 2.3 SP7

    Modifies PolledData objects configured for the node with the given IP address with the properties of PolledData passed as argument. When the key of this PolledData matches any of the PolledDatas in the Polling Engine then that PolledData is modified else, a new PolledData is added.

    Parameters:
    ipaddr - IP address of the node for which the PolledData is to be modified.
    pd - The PolledData to be assigned.
    Returns:
    boolean representing the status of the operation.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving PolledData objects for the node.
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    getPolledDataForNode(java.lang.String)

    setPolledDataForNodes

    boolean setPolledDataForNodes(java.lang.String[] ipaddrlist,
                                  PolledData pd)
                                  throws UserTransactionException,
                                         NmsPollException,
                                         java.rmi.RemoteException
    Deprecated. as of version Web NMS 2.3 SP7

    Replaces PolledData objects of all the nodes whose IP addresses matches the IP addresses in the given list, with the PolledData passed. When the key of this PolledData matches any of the PolledDatas in the Polling Engine then that PolledData is modified else, a new PolledData is added.

    Parameters:
    ipaddrlist - the list of IP addresses for which PolledDatas are to be modified
    pd - The PolledData with which the modification has to be made.
    Returns:
    boolean representing the status of the operation. Returns false even if the operation is unable to assign the PolledData to any one of the IpAddresses in the given list
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException
    See Also:
    getPolledDataForNodes(String[])

    setPolledDataForNodes

    boolean setPolledDataForNodes(java.lang.String startip,
                                  java.lang.String endip,
                                  java.lang.String netmask,
                                  PolledData pd)
                                  throws java.rmi.RemoteException,
                                         NmsPollException,
                                         UserTransactionException
    Deprecated. as of version Web NMS 2.3 SP7

    Replaces all the PolledData objects of all the Nodes whose IpAddres falls between startip and endip with the pd passed. The starting and ending IPAddress must belong to same network.

    Parameters:
    startip - The starting ip address.
    endip - The ending ip address.
    netmask - The netmask.
    pd - the PolledData with which the modification has to be made.
    Returns:
    boolean representing the status of the operation. Returns false even if the operation is unable to assign the PolledData to any one of the IpAddress in the give range.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException -
    • if an invalid netmask is given
    • if the starting and ending ipaddresses are invalid values
    • if the starting and ending ipaddresses are not in the same network
    java.rmi.RemoteException - if an exception occurs during remote call

    removePolledDataForNode

    boolean removePolledDataForNode(java.lang.String ipaddr,
                                    java.lang.String key)
                                    throws UserTransactionException,
                                           NmsPollException,
                                           java.rmi.RemoteException
    Deprecated. as of version Web NMS 2.3 SP7

    Removes PolledData objects for a node with the given IP address. The key for the PolledData object pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid. The name and oid of the PolledData to be removed is taken from the key passed and the agent name will be the dns name corresponding to the IP address given.

    Parameters:
    ipaddr - the IP address for which the PolledData is to be removed.
    key - the key of the PolledData to be removed.
    Returns:
    boolean representing the status of the operation.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving PolledData for the node.
    java.rmi.RemoteException - if an exception occurs during remote call

    removePolledDataForNodes

    boolean removePolledDataForNodes(java.lang.String[] ipaddr,
                                     java.lang.String key)
                                     throws java.rmi.RemoteException,
                                            NmsPollException,
                                            UserTransactionException
    Deprecated. as of version Web NMS 2.3 SP7

    Removes PolledData objects for the nodes whose IP addresses matches the IP addresses in the given list. The key for the PolledData object pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid. For each of these IP addresses , the name and oid of the PolledData to be removed is taken from the key passed and the agent name will be the dns name corresponding to the IP address.

    Parameters:
    ipaddr - list containing the IP addresses for which the PolledData is to be removed.
    key - the key of the PolledData to be removed.
    Returns:
    boolean representing the status of the operation. Returns false even if the operation is unable to remove the PolledData of any one of the IP addresses in the list.
    Throws:
    UserTransactionException - if this method is called from a transaction block and if transaction times out.
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException

    removePolledDataForNodes

    boolean removePolledDataForNodes(java.lang.String startip,
                                     java.lang.String endip,
                                     java.lang.String netmask,
                                     java.lang.String key)
                                     throws java.rmi.RemoteException,
                                            NmsPollException,
                                            UserTransactionException
    Deprecated. as of version Web NMS 2.3 SP7

    Removes PolledData objects for the nodes whose IP addresses fall between startip and end ip. The starting and ending IP address must belong to same network and the netmask given should be a valid one. The key for the PolledData object pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid. For each of these IP addresses , the name and oid of the PolledData to be removed is taken from the key passed and the agent name will be the dns name corresponding to the IP address.

    Parameters:
    startip - The starting ip address.
    endip - The ending ip address.
    netmask - The netmask.
    key - the key of the PolledData to be removed.
    Returns:
    boolean representing the status of the operation. Returns false even if the operation is unable to remove the PolledData of any one of the IP address in the given range.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException -
    • if an invalid netmask is given
    • if the starting and ending ipaddresses are invalid values
    • if the starting and ending ipaddresses are not in the same network

    startDataPoll

    boolean startDataPoll()
                          throws java.rmi.RemoteException
    Starts data collection.

    Returns:
    boolean true if data collection is started.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    stopDataPoll

    boolean stopDataPoll()
                         throws java.rmi.RemoteException
    Stops data collection.

    Returns:
    boolean true if data collection is stopped.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    getActivePollers

    java.util.Vector getActivePollers()
                                      throws java.rmi.RemoteException
    Returns a Vector of names of all the active pollers at that time.

    Returns:
    Vector containing names of all active pollers.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    isPollerActive

    boolean isPollerActive(java.lang.String pollerName)
                           throws java.rmi.RemoteException
    Returns the status of the remote poller identified by the name given as argument.

    Parameters:
    pollerName - Name of the remote poller whose status to be checked as String.
    Returns:
    boolean true if the poller is active or otherwise.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    shutDownPoller

    void shutDownPoller(java.lang.String pollerName)
                        throws java.rmi.RemoteException
    ShutDown the poller with the name passed as a parameter.

    Parameters:
    pollerName - Name of the remote poller to be shut down as String.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    shutDownAllPollers

    void shutDownAllPollers()
                            throws java.rmi.RemoteException
    ShutDown all the remote pollers which are active currently.

    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    addThresholdObject

    boolean addThresholdObject(ThresholdObject obj)
                               throws UserTransactionException,
                                      NmsPollException,
                                      java.rmi.RemoteException
    Adds a ThresholdObject to the Polling Engine. This threshold object can be associated with any PolledData object to check for thresholds.

    Parameters:
    obj - ThresholdObject which has to be added.
    Returns:
    boolean representing the status of the operation.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException - if there is any exception while adding Threshold Object.

    modifyThresholdObject

    boolean modifyThresholdObject(ThresholdObject obj)
                                  throws UserTransactionException,
                                         NmsPollException,
                                         java.rmi.RemoteException
    Modifies the ThresholdObject which has been added already. (i.e.,)changes the properties of the ThresholdObject already present in the Polling Engine with the one passed as argument.

    Parameters:
    obj - ThresholdObject with the properties to be modified.
    Returns:
    boolean to represent the status of the operation.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException - if there is any exception while modifying Threshold Object.

    deleteThresholdObject

    boolean deleteThresholdObject(java.lang.String name)
                                  throws UserTransactionException,
                                         NmsPollException,
                                         java.rmi.RemoteException
    Deletes the ThresholdObject whose name is passed as a parameter from Polling Engine.

    Parameters:
    name - name of the thresholdObject to be deleted.
    Returns:
    boolean representing the status of the operation.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException - if there is any exception while deleting Threshold Object.

    getAllThresholdObjects

    java.util.Vector getAllThresholdObjects()
                                            throws java.rmi.RemoteException
    Returns a Vector containing all the available ThresholdObjects.

    Returns:
    the Vector containing all available ThresholdObjects.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    setDebugMode

    void setDebugMode(boolean debug)
                      throws java.rmi.RemoteException
    Sets the debugging to true/false based on which some debugging messages will be printed during data collection. These messages will be printed in nmsout.txt present in WebNMS / logs directory.

    Parameters:
    debug - indicates whether to set debugging mode or not.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    getCollectedValues

    CollectedData getCollectedValues(java.lang.String key,
                                     long timeStart,
                                     long timeEnd)
                                     throws UserTransactionException,
                                            NmsPollException,
                                            java.rmi.RemoteException
    Returns the data collected for the PolledData object whose key matches with the key passed, and is collected between the specified time. This method requires the start time and end time as long and both represent time in milliseconds since epoch.

    Parameters:
    key - The key of the PolledData Object whose data is required. The key for a PolledData pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    timeStart - The starting time from when the collected data is required. The time is given as a long value and it represents time in milli seconds since epoch.
    timeEnd - The end time until when the collected data is required as long value and it represents time in milli seconds since epoch.
    Returns:
    CollectedData containing the collected statistics.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException - if there is any exception while retrieving PolledData corresponding to the key passed.

    getCollectedValues

    CollectedData getCollectedValues(java.lang.String key,
                                     long timeStart)
                                     throws UserTransactionException,
                                            NmsPollException,
                                            java.rmi.RemoteException
    Returns the data collected for the given PolledData object whose key is given and between the start time specified till the current time . This method requires the start time in long .

    Parameters:
    key - The key of the PolledData Object whose data are required. The key for a PolledData pd is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
    timeStart - The starting time from when the collected data is required. The time is given as a long.
    Returns:
    CollectedData containing the collected statistics.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException - if there is any exception while retrieving PolledData corresponding to the key passed.

    addPollingObject

    void addPollingObject(PollingObject po,
                          boolean updateOldMOs)
                          throws UserTransactionException,
                                 NmsPollException,
                                 java.rmi.RemoteException
    Adds a new PollingObject to the Polling Engine. This method takes a PollingObject and a boolean specifying whether to apply this Polling Object to already existing ManagedObjects or not. If this boolean is false ,then this Polling Object will be applicable only to Managed Objects which are discovered later(after addition of this PollingObject). if it is true ,polling will be configured for an already discovered ManagedObject if , Since it is a very costly process it is not advisible to use this option(i.e., setting updateOldMOs to true) unless it is absolutely necessary.

    Parameters:
    po - PollingObject to be added.
    updateOldMOs - a boolean value specifying whether this Polling Object has to be applied to already discovered ManagedObjects or not.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while adding PollingObject.
    UserTransactionException - if this method is called within a transaction block and if transaction times out

    modifyPollingObject

    void modifyPollingObject(PollingObject po,
                             boolean updateOldMOs)
                             throws UserTransactionException,
                                    NmsPollException,
                                    java.rmi.RemoteException
    Modifies an existing PollingObject. This method takes a PollingObject and a boolean specifying whether to apply the changes(applicable only if new oids are being added) to already existing ManagedObjects or not. Only the data collection details and status can be modified for a Polling Object. This includes addition of new oids , modification of existing oids(except name , oid string and type) and deletion of existing oids. Modification and deletion of existing oids will have effect on existing PolledDatas. If any new oids are added ,addition of new PolledDatas will depend on the parameter updateOldMOs and the value of PASS_THRO_ALL_POLLING_OBJECTS given in NmsProcessesBE.conf.
    Since this is a very costly process it is not advisible to use this option(i.e.,setting updateOldMOs to true) unless it is absolutely necessary.

    Parameters:
    po - Polling Object to be modified.
    updateOldMOs - a boolean specifying whether to apply the changes (if any new oids are added) to already existing ManagedObjects or not.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while modifying the PollingObject
    UserTransactionException - if this method is called within a transaction block and if transaction times out

    modifyPropForPollingObject

    void modifyPropForPollingObject(java.lang.String name,
                                    java.util.Properties prop,
                                    boolean updateMOs)
                                    throws UserTransactionException,
                                           NmsPollException,
                                           java.rmi.RemoteException
    modifies properties of a single oid or adds a new oid in the data collection criteria of PollingObject whose of name passed as a parameter. prop represents the new properties of the oid and the boolean updateMOs indicates whether to apply changes to existing ManagedObjects or not(applicable only if the oid is being added).

    The properties prop must contain the fields oid ,name and type which form the key of the oid string. If the oid with the oid key is already present in the Polling Object,then all the corresponding PolledDatas will be modified as per the new properties. If such an oid key is not present already , if the boolean updateMOs is false,then the new property will be added as a part of data collection criteria and PolledDatas with this new oid will be created for ManagedObjects which get added later .
    On the other hand , if the the boolean updateMOs is true ,

    The key refers to key of the oid, name of oid + "::" + oid string + "::" + type of oid .

    Parameters:
    name - name of the PollingObject
    prop - the new properties of the oid.
    updateMOs - a boolean value indicating whether to apply the changes to existing ManagedObjects or not.(applicable only if oid is being added).
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while modification or additon as the case may be.
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    PollingObject

    deletePropForPollingObject

    void deletePropForPollingObject(java.lang.String name,
                                    java.lang.String key)
                                    throws UserTransactionException,
                                           NmsPollException,
                                           java.rmi.RemoteException
    Deletes a single oid from the PollingObject whose name is passed as a parameter. The key refers to key of the oid, name of oid + "::" + oid string + "::" + type of oid . If such an oid exists , it's entry in the PollingObject is removed.Also all the corresponding PolledDatas will be deleted.

    Parameters:
    name - name of the PollingObject
    key - key of the oid
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while deleting the oid.
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    PollingObject

    deletePollingObject

    void deletePollingObject(java.lang.String name)
                             throws UserTransactionException,
                                    NmsPollException,
                                    java.rmi.RemoteException
    Deletes the PollingObject whose name is passed as a parameter from Polling Engine. Also all the PolledDatas corresponding to this PollingObject will be deleted.

    Parameters:
    name - name of the PollingObject to be deleted.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while deleting PollingObject and corresponding PolledDatas.
    UserTransactionException - if this method is called within a transaction block and if transaction times out

    getPollingObject

    PollingObject getPollingObject(java.lang.String name)
                                   throws java.rmi.RemoteException,
                                          NmsPollException
    Returns the PollingObject whose name is passed as a parameter.

    Parameters:
    name - name of the PollingObject to be retrieved.
    Returns:
    The specified PollingObject.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while getting PollingObject.

    getPollingObjects

    java.util.Vector getPollingObjects()
                                       throws java.rmi.RemoteException,
                                              NmsPollException
    Returns a Vector of all PollingObjects in Polling Engine.

    Returns:
    A Vector contains all the Polling Objects.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while getting Polling Objects.
    See Also:
    PollingObject

    setPollingObjectStatus

    void setPollingObjectStatus(java.lang.String name,
                                boolean status)
                                throws UserTransactionException,
                                       NmsPollException,
                                       java.rmi.RemoteException
    sets status of the PollingObject name to the given value. The default status of a PollingObject is true in which case the active state of PolledDatas will be set as per their individual active property. But if status is explicitly set to true using this method , active state of all PolledDatas of this PollingObject will be set to true. Similarly if status is false, active state of PolledDatas will be set to false. The active property of a PolledData indicates whether polling is being done currently for that PolledData or not.Setting active to false suspends polling for the PolledData.

    Parameters:
    name - name of the PollingObject whose status is to be set.
    status - status of PollingObject whether true or false.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while setting status
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    PollingObject, getPollingObjectStatus(java.lang.String)

    getPollingObjectStatus

    boolean getPollingObjectStatus(java.lang.String name)
                                   throws java.rmi.RemoteException,
                                          NmsPollException
    returns the status of the PollingObject,whose name is passed as a parameter to this method.

    Parameters:
    name - name of the Polling Object.
    Returns:
    status of the Polling Object.
    Throws:
    java.rmi.RemoteException - if an exception occurs remote call
    NmsPollException - if an exception occurs while getting status.
    See Also:
    PollingObject, setPollingObjectStatus(java.lang.String, boolean)

    addPollFilter

    void addPollFilter(java.lang.String className)
                       throws UserTransactionException,
                              NmsPollException,
                              java.rmi.RemoteException
    Adds a new poll filter to the Polling Engine. PolledDatas which are added will be passed through this filter. The filter must implement PollFilter interface.

    Parameters:
    className - fully qualified class name of the Poll Filter .
    Throws:
    java.rmi.RemoteException - if an exception occurs remote call
    NmsPollException - if an exception occurs while adding poll filter
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    PollFilter

    deletePollFilter

    void deletePollFilter(java.lang.String className)
                          throws UserTransactionException,
                                 NmsPollException,
                                 java.rmi.RemoteException
    Deletes an existing poll filter from Poll Engine whose name is passed as an argument. PolledData that are added will be no more passed through this filter.

    Parameters:
    className - fully qualified class name of the poll filter to be deleted
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while deleting
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    PollFilter

    getThreshHashOfOid

    java.util.Hashtable getThreshHashOfOid()
                                           throws java.rmi.RemoteException
    Returns a Hashtable containing names of ThresholdObjects associated with oids. In this Hashtable Vector of Threshold Object names are stored against PollingObject name+oid name . For example if a PollingObject with name 'snmpnode' consists of the oid '2.2.1.10' with oid name "INTERFACE_in_octets" and threshold1,threshold2 are the names of ThresholdObjects associated with this oid, then this method will return the Hashtable which contains the Vector of these ThresholdObject names against PollingObject Name+ oid name.

    Returns:
    Hashtable containing thresholdObject names against the key PollingObject name + oid name.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    addReport

    void addReport(ReportObject ro)
                   throws UserTransactionException,
                          NmsPollException,
                          java.rmi.RemoteException
    Adds a new report to the Polling Engine. The className in the ReportObject must implement ReportIfc interface. If time for report generation is not set in the ReportObject(setTimeVal() method) , this method takes care of setting up the time depending on the parameters given in ReportObject like whether it is a daily report / weekly report etc.,

    Parameters:
    ro - The ReportObject to be added.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while adding report.
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    scheduleReport(String,long), Reporter

    deleteReport

    void deleteReport(java.lang.String name)
                      throws UserTransactionException,
                             NmsPollException,
                             java.rmi.RemoteException
    Deletes an existing report whose name is passed as a parameter.

    Parameters:
    name - name of the report to be deleted.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while deleting report.
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    ReportObject

    scheduleReport

    void scheduleReport(java.lang.String name,
                        long timeval)
                        throws UserTransactionException,
                               NmsPollException,
                               java.rmi.RemoteException
    Schedules an existing report to be run at a given time. The timeval given will override the default report generation time.If timeval is less than current time, the report will be run immediately.After running the report at the given timeval, the next report generation time will be set depending on the type of the report(daily/weekly etc).

    Parameters:
    name - name of the report to be scheduled.
    timeval - the time in milliseconds at which the report should be run.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while scheduling report.
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    ReportObject

    register

    void register(PollUnitObserver pdObs)
                  throws java.rmi.RemoteException,
                         NmsPollException
    Registers for getting the notifications whenever a PolledData is added/modified/deleted. This Observer will be intimated when a PolledData is added/modified/ deleted.

    Parameters:
    pdObs - a PollUnitObserver Observer which needs to get the notification.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs during registering.

    deRegister

    void deRegister(PollUnitObserver pdObs)
                    throws java.rmi.RemoteException,
                           NmsPollException
    Deregisters this observer from getting the notifications whenever a PolledData is added/modified/deleted. This Observer will be no more intimated when a PolledData is added/ modified/deleted.

    Parameters:
    pdObs - instance of a PollUnitObserver. Observer that was getting notifications.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs during registering.

    addProtocolProvider

    void addProtocolProvider(java.lang.String protocol,
                             ProtocolProvider prov)
                             throws UserTransactionException,
                                    NmsPollException,
                                    java.rmi.RemoteException
    Adds a new ProtocolProvider class for the protocol provided. This provider class will be used to poll PolledDatas with the givenprotocol.

    Parameters:
    protocol - String for which provider is added.
    prov - a ProtocolProvider class for this protocol.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while adding provider.
    UserTransactionException - if this method is called within a transaction block and if transaction times out

    deleteProtocolProvider

    void deleteProtocolProvider(java.lang.String protocol)
                                throws UserTransactionException,
                                       NmsPollException,
                                       java.rmi.RemoteException
    Deletes the provider class defined for this protocol whose name is passed as a parameter to this method. This ProtocolProvider will be no longer be used to collect data.

    Parameters:
    protocol - name of the protocol for which the provider is deleted.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsPollException - if an exception occurs while deleting provider
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    ProtocolProvider

    addCreateSchema

    void addCreateSchema(java.lang.String tableName,
                         java.lang.String schema)
                         throws UserTransactionException,
                                NmsStorageException,
                                java.rmi.RemoteException
    Adds a new table name and the respective schema to Poll Engine to create this table. When this table name is associated with a PolledData, the table will be created and the collected data will be stored in this table. The schema string should be like ,
    create table <> (column1 type1, column2 type2, ....). Alternately, table can be created using createTable(String) and then this table name can be associated with any PolledData.

    Parameters:
    tableName - name of the table
    schema - String which is used to create the table
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsStorageException - if an exception occurs while adding the schema.
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    createTable(String), PolledData, PolledData.setStatsDataTableName(String)

    getCreateSchema

    java.lang.String getCreateSchema(java.lang.String tableName)
                                     throws java.rmi.RemoteException
    Returns the schema that is used for creating the table that is specified as argument.

    Parameters:
    tableName - name of the table for which schema is returned.
    Returns:
    the String which is the schema used to create this table
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    createTable

    void createTable(java.lang.String tableName)
                     throws UserTransactionException,
                            NmsStorageException,
                            java.rmi.RemoteException
    Creates the table whose name is given as argument. If the schema for creation of this table is already present then table will be created according to this schema else, it will throw NmsStorageException

    Parameters:
    tableName - the name of the table which should be created.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    NmsStorageException - if an exception occurs while creating table.
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    See Also:
    addCreateSchema(String,String)

    checkOut

    PolledData checkOut(java.lang.String key)
                        throws UserTransactionException,
                               NmsPollException,
                               java.rmi.RemoteException
    Checks out the PolledData with the given key from the database for writing, with a write lock. This method blocks for a very long time until the PolledData is ready for writing, if the object is locked by another thread. Returns null if the PolledData is not present in the database.

    Note: Use the checkOut(String, int) method to check out objects from the database with locks, as it might result in the method call getting blocked unacceptably.

    Parameters:
    key - The unique key of the PolledData to be checked out
    Returns:
    PolledData, if it is present in the database, null, if not present in the database
    Throws:
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException - if the object is not available for writing
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    checkOut(String,int)

    checkOut

    PolledData checkOut(java.lang.String key,
                        int timeOut)
                        throws UserTransactionException,
                               NmsPollException,
                               java.rmi.RemoteException
    Checks out the PolledData with the given key from the database for writing, with a write lock. If the PolledData to be checked out is currently locked by some other thread, this method keeps trying to check out the object for the specified time. If the PolledData becomes available for writing before the specified time, the object is fetched from the database, locked and returned back. Returns null if the PolledData is not present in the database.

    Parameters:
    key - The unique key of the PolledData to be checked out
    timeOut - Time in seconds to wait, if the object is locked by some other thread.
    Returns:
    PolledData, if it is present in the database, null, if not present in the database
    Throws:
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    NmsPollException - if the object is not available for writing even after the specified amount of time.
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    checkOut(String)

    checkOutIfAvailable

    PolledData checkOutIfAvailable(java.lang.String key)
                                   throws UserTransactionException,
                                          NmsPollException,
                                          java.rmi.RemoteException
    Checks out the PolledData with the given key from the database for writing, with a write lock. This method throws an Exception if the managed object is locked by another thread and if the thread doesn't wait.

    Parameters:
    key - The unique key of the PolledData to be checked out
    Returns:
    PolledData, if it is present in the database, null, if not present in the database
    Throws:
    UserTransactionException - if this method is called within a transaction block and if transaction times out
    java.rmi.RemoteException - if a problem occurs when accessing through RMI.
    NmsPollException - if the object is locked by some other thread

    lock

    PolledData lock(PolledData obj,
                    int lock_type,
                    int timeout)
                    throws java.rmi.RemoteException,
                           NmsPollException
    Applies the specified lock to the PolledData. This method will lock the specified PolledData, by applying the given type of lock, which will actually define access levels for the object. This interface defines the lock types and various other methods to implement the locking mechanism as required by the user. The third argument specifies the time in seconds as to how long to wait to obtain the lock for the PolledData.

    Parameters:
    obj - The PolledData that is to be locked.
    lock_type - The type of lock to be applied.
    timeout - Time, in seconds, to wait to acquire the lock.
    Returns:
    The PolledData with the lock set in it's lockId property.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs during locking.
    See Also:
    LockableObject

    unlock

    void unlock(PolledData obj)
                throws java.rmi.RemoteException,
                       NmsPollException
    Unlocks the specified PolledData. This method will unlock the given instance of PolledData, releving it from all the previously applied locks.

    Parameters:
    obj - The PolledData that is to be unlocked.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs during unlock.
    See Also:
    LockableObject

    checkWritePermission

    boolean checkWritePermission(PolledData obj)
                                 throws java.rmi.RemoteException,
                                        NmsPollException
    Checks whether this instance of the PolledData can be written to the database. This method checks whether the specified instance of the PolledData currently holds a valid write lock, so that it can be written to the database.

    Parameters:
    obj - The PolledData instance that is to be checked whether it has a write lock.
    Returns:
    true if the object holds a write lock, false otherwise.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while checking the permission for writing.
    See Also:
    LockableObject

    getCurrentLockType

    int getCurrentLockType(PolledData obj)
                           throws java.rmi.RemoteException,
                                  NmsPollException
    Gets the type oflock currently held by the specified instance of the PolledData. This method is useful in finding out what type of lock this instance of the PolledData holds, when multiple instances hold different types of locks.

    Parameters:
    obj - PolledData instance for which the lock type is to be obtained.
    Returns:
    The lock type value, as defined in the LockableObject interfae, currently held by the specified instance of the PolledData. If the object instance is not locked previously, this method returns UNKNOWN_LOCK.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while getting the lock type.

    clearLockForObject

    void clearLockForObject(java.lang.String name,
                            int lockType)
                            throws UserTransactionException,
                                   NmsPollException,
                                   java.rmi.RemoteException
    Releases the specified lock type unconditionally for the PolledData with the given name. If under some exceptional condition, a PolledData instance that was holding a lock, is lost before it has unlocked, then it will result in all subsequent requests for locks over that PolledData to fail. In such a case, this method can be used to unconditionally release the specified lock type by giving just the name of the PolledData. But the effect of this method depends entirely on the implementation of the LockableObject interface.

    Parameters:
    name - Name of the PolledData to be unlocked.
    lockType - Type of the lock to be unlocked.
    Throws:
    UserTransactionException - if this method is called within a transaction block and if transaction times out.
    NmsPollException - if there is any exception while retrieving PolledData .
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while clearing the lock.

    removePoll

    boolean removePoll(PolledData pd,
                       boolean dealWithLocks)
                       throws java.rmi.RemoteException,
                              NmsPollException,
                              UserTransactionException
    Stops polling of the PolledData identified by the key and also deletes the corresponding PolledData object from the polling engine database. This checks for lock if the second parameter is true.

    Parameters:
    pd - PolledData object which is to be deleted.
    dealWithLocks - boolean suggesting whether to check for locking or not.
    Returns:
    "true" if PolledData with the given key is removed successfully, "false" if PolledData could not be removed or if PolledData with the given key could not be found.
    Throws:
    UserTransactionException - if there is any exception while doing transaction operations.
    java.rmi.RemoteException - if an exception occurs during remote call.
    NmsPollException - if an exception occurs while removing PolledData

    modifyPoll

    void modifyPoll(PolledData pdata,
                    boolean dealWithLocks)
                    throws java.rmi.RemoteException,
                           NmsPollException,
                           UserTransactionException
    Modifies the PolledData whose key matches with the key of PolledData passed as as a parameter . This also checks whether the object is locked if the second parameter is true. If the key of the PolledData, passed as the argument, matches that of any other PolledData object already in the database, then that PolledData's properties will be changed to the given PolledData's properties. Else the given PolledData will be added as a new PolledData and the Poll is started for this.

    Parameters:
    pdata - The PolledData object to be modified.
    dealWithLocks - boolean to check for locking.
    Throws:
    UserTransactionException - if there is any exception while doing transaction operations.
    NmsPollException - if ,
    • there is any exception while retrieving PolledData from the database
    • if there is any exception while updating database.
    java.rmi.RemoteException - if an exception occurs during remote call.

    obtainPollerSpecificPolledData

    void obtainPollerSpecificPolledData(java.lang.String name,
                                        long startId)
                                        throws java.rmi.RemoteException
    This method will be used by Remote pollers. It will initiate the fetching of polled data values for a specific remote poller that can be directly dumped into the database.

    Parameters:
    name - Name of the Remote Poller as String.
    startId - The starting Id of the polledDatas to be fetched.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call
    See Also:
    RemotePoller

    getDynamicTablesAndSchemas

    java.util.Hashtable getDynamicTablesAndSchemas()
                                                   throws java.rmi.RemoteException
    Returns a Hashtable containing a Vetcor dynamic tables names and a hashtable containing its Schema mapping.

    Returns:
    return Hashtable containing table names vector and its Schema hashtable.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call

    getObjectPropsWithProps

    java.util.Vector getObjectPropsWithProps(java.lang.String classname,
                                             java.lang.String[] fetchProps,
                                             java.util.Properties match,
                                             boolean returnAsProps,
                                             boolean performOr)
                                             throws NmsStorageException,
                                                    UserTransactionException,
                                                    java.rmi.RemoteException
    Gets a Vector containing selective properties of objects matching the given criteria. The criteria can be a list of properties taken from properties of PolledData or its derived objects. The objects will be selected if they match with any or all the properties given in the match criteria, ie., it uses the both AND or OR operator while querying the tables with the match criteria to obtain the required result. The user properties cannot be used in the match criteria or in the required properties. The classname signifies the classname of the PolledData objects that must be considered for the selection of objects. Not all the properties of the match objects are returned. The required properties passed in the fetchProperties array will be retured as Properties object of key and value. The vector will have Properties for every match object of requested Properties alone. This will be enable shallow fetch of objects properties based on criteria.

    For example, to fetch few properties say name, active and period of all the PolledData objects whose agent starts with "a", the following code snippet can be used.

     Properties criteria = new Properties();
     criteria.put("agent","a*");
     String fetchProperties = {"name","active","period"};
     Vector PDVector  =  pollAPI.getObjectPropsWithProps("PolledData",fetchProperties,criteria,true,false);
     
    Now the PDVector will Properties object for all objects match the criteria. The Properties will have 3 elements for name, period and active for all the PolledData.

    This method returns only those objects which belong to the classname that is passed to this method. If the given classname is incorrect, i.e., any of the property name given in the match criteria is not found in the properties of PolledData associated with the given classname, then this method will return null. In order to fetch all the objects from all the available PolledData objects, the classname should be passed as "null". Note : The fetchProperties will return properties stored in database.

    Parameters:
    classname - the classname for the objects that are selected.
    fetchProperties - the properties that needs to be fetched.
    match - the criteria based on which the objects to be selected from the database.
    returnAsProps - if true, returns a Vector of Properties objects else List of properties in order specified in fetchProperties
    performOr - if true, does a OR operation on the properties in criteria Properties else AND of the criteria.
    Returns:
    a Vector of Properties object with selected properties of objects matching the given criteria. Returns 'null' when the classname is null or no matching objects found in the database
    Throws:
    java.rmi.RemoteException - if a problem occurs when accessing through RMI.
    NmsStorageException - that may occur if any SQL error occurs while performing database operations.
    UserTransactionException - that may occur if the current transaction is rolled back because of time out.

    getUpdateTime

    long getUpdateTime()
                       throws java.rmi.RemoteException
    Returns the time at which the Collected data is inserted in the database when the BULK_INSERT_INTERVAL is set to some positive value.This method is used internally by Web NMS.

    Returns:
    return the time at which the Collected Data is inserted in the StatsData table of the database.
    Throws:
    java.rmi.RemoteException - if an exception occurs during remote call.

    "WEBNMS_5 API Docs"

    Copyright © 2011 ZOHO Corp., All Rights Reserved.