|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PollAPI
The API interface for accessing, adding, modifying and deleting PolledData objects in the polling engine database. The PollAPI Provides methods for :
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.
| 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 |
|---|
boolean isInitialized()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
PolledData getPolledData(java.lang.String key)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.
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
void addPoll(PolledData pd)
throws java.rmi.RemoteException,
UserTransactionException,
NmsPollException
setActive(boolean))
else data collection is not started for this PolledData.
pd - The PolledData object to be added.
NmsPollException - if ,UserTransactionException - if there is any exception while
doing transaction operations.
java.rmi.RemoteException - if an exception occurs during remote call
void addPolledData(PolledData pd,
boolean passthrofilters)
throws java.rmi.RemoteException,
UserTransactionException,
NmsPollException
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.
pd - a PolledData to be added to the systempassthrofilters - a boolean indicating whether to pass
through poll filters or not.
NmsPollException - if ,UserTransactionException - if there is any exception while
doing transaction operations.
java.rmi.RemoteException - if an exception occurs during remote call.PollToTopoIfc.getManagedObject(String)
void addPolledDataForMO(ManagedObject mo)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
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:
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-".
isDHCP is false, dnsname is obtained using
the ipAddress provided and is set as agent names for PolledDatas.
mo - ManagedObject for which the PolledData is to
be added.
NmsPollException - if ,UserTransactionException - if there is any exception while doing transaction operations.
java.rmi.RemoteException - if an exception occurs during remote call.addPoll(PolledData)
void deletePoll(java.lang.String name)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
name - The agent name of the PolledData object for which
data collection is to be stopped and the PolledData objects are to
be deleted.
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
boolean removePoll(java.lang.String key)
throws NmsPollException,
UserTransactionException,
java.rmi.RemoteException
removePoll(PolledData,boolean) instead
key - the key of the PolledData which is to be removed.The key
is pd.name+"\t"+pd.agent.toLowerCase().trim()+"\t"+pd.oid
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
void restart()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
void stopAll()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
void modifyPoll(PolledData pd)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
modifyPoll(PolledData,boolean) instead
pd - The PolledData object to be modified.
UserTransactionException - if there is any exception while
doing transaction operations.
NmsPollException - if ,java.rmi.RemoteException - if an exception occurs during remote call
void registerForData(java.lang.String key,
PollObserver pollob)
throws java.rmi.RemoteException
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.
java.rmi.RemoteException - if an exception occurs during remote callPollObserver
void deregisterForData(java.lang.String key,
PollObserver pollob)
throws java.rmi.RemoteException
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.
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.
java.rmi.RemoteException - if an exception occurs during remote callPollObserver
void registerForAllData(PollObserver pollob)
throws java.rmi.RemoteException
pollob - The implementing class of PollObserver which
is to be notified of the collected data.
java.rmi.RemoteException - if an exception occurs during remote callPollObserver
void deregisterForAllData(PollObserver pollob)
throws java.rmi.RemoteException
pollob - The implementing class of PollObserver which
is to be deregistered.
java.rmi.RemoteException - if an exception occurs during remote callPollObserver
void registerForDataFromAgent(java.lang.String agent,
PollObserver pollob)
throws java.rmi.RemoteException
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.
java.rmi.RemoteException - if an exception occurs during remote callPollObserver
void deregisterForDataFromAgent(java.lang.String agent,
PollObserver pollob)
throws java.rmi.RemoteException
agent - agent name whose data was notified.pollob - The implementing class of PollObserver which is to
be deregistered.
java.rmi.RemoteException - if an exception occurs during remote callPollObserver
CollectedData getCollectedData(java.lang.String key,
java.util.Date date)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.oiddate - The date on which data collected is required.
The date is the instance of java.util.DategetCollectedData(String,String ,Date)
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
CollectedData getCollectedData(java.lang.String instance,
java.lang.String key,
java.util.Date date)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.oiddate - Date on which the data collected are required.
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
CollectedData getCollectedData(java.lang.String instance,
java.lang.String key,
long timeStart)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.
instance - instance string of the MultiplePolledDatakey - 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.oidtimeStart - 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.
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
CollectedData getCollectedData(java.lang.String index,
java.lang.String key,
long timeStart,
long timeEnd)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.
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.oidtimeStart - 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.
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
java.util.Vector getInstances(MultiplePolledData mpd)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
mpd - MultiplePolledData whose instance strings has to be obtained.
mpd as
String.
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
boolean suspendAllPollsForAgent(java.lang.String agentname)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
resumeAllPollsForAgent(String).
agentname - Name of the agent for which data collection
has to be suspended.
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
boolean resumeAllPollsForAgent(java.lang.String agentname)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
agentname - Name of the agent for which data collection
are to be resumed.
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
java.util.Vector getPollsForAgent(java.lang.String agentname)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
agentname - Name of the agent whose keys of the PolledData
have to be returned.
String.
Empty Vector if there is no PolledData configured for that agent.
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
java.util.Vector getObjects(java.lang.String classname,
java.util.Properties match)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.
classname - name of the class the object belongs.match - properties which is to be matched with the object's
properties.
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
int getNumPollObjects()
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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
@Deprecated
boolean registerPoller(RemotePoller rp,
java.lang.String pollerName)
throws java.rmi.RemoteException
rp - RemotePoller which is to be registered with the Poll engine.pollerName - Name of the Poller.
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
java.util.Hashtable registerRemotePoller(RemotePoller rp,
java.util.Hashtable pollerProps)
throws java.rmi.RemoteException,
NmsPollException
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.
java.rmi.RemoteException - if an exception occurs during remote call
NmsPollExceptionRemotePoller
@Deprecated
void deregisterPoller(java.lang.String pollerName)
throws java.rmi.RemoteException
pollerName - Name of the Poller which is to be deregistered.
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
boolean deregisterRemotePoller(RemotePoller poller)
throws java.rmi.RemoteException
poller - Poller instance which has to be deregistered.
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
java.util.Vector fetchPollerSpecificPolldata(java.lang.String name)
throws java.rmi.RemoteException
name - Name of the Poller as String.
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
java.util.Vector getTableNames()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
void updateNumericTypeOfPd(java.lang.String key,
int numericType)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.oidnumericType - value to be set to numericType property of
PolledData..
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
java.util.Vector getPolledDataForNode(java.lang.String ipaddr)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
ipaddr - IP address of the node as String.
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 callsetPolledDataForNode(java.lang.String, com.adventnet.nms.poll.PolledData)
java.util.Vector getPolledDataForNodes(java.lang.String[] ipaddrlist)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
ipaddrlist - IP addresses as String[] array.
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#setPolledDataForNodes(String[])
java.util.Vector getPolledDataForNodes(java.lang.String startip,
java.lang.String endip,
java.lang.String netmask)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
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.
startip - The starting ip address as String.endip - The ending ip address as String.netmask - The netmask as String.
UserTransactionException - if this method is called from
a transaction block and if transaction times out.
NmsPollException - java.rmi.RemoteException - if an exception occurs during remote callsetPolledDataForNodes(String,String,String,PolledData)
boolean setPolledDataForNode(java.lang.String ipaddr,
PolledData pd)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
ipaddr - IP address of the node for which the PolledData is
to be modified.pd - The PolledData to be assigned.
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 callgetPolledDataForNode(java.lang.String)
boolean setPolledDataForNodes(java.lang.String[] ipaddrlist,
PolledData pd)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
ipaddrlist - the list of IP addresses for which PolledDatas are to
be modifiedpd - The PolledData with which the modification has to be made.
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
NmsPollExceptiongetPolledDataForNodes(String[])
boolean setPolledDataForNodes(java.lang.String startip,
java.lang.String endip,
java.lang.String netmask,
PolledData pd)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
The starting and ending IPAddress must belong to same
network.
startip - The starting ip address.endip - The ending ip address.netmask - The netmask.pd - the PolledData with which the modification has to be made.
UserTransactionException - if this method is called from
a transaction block and if transaction times out.
NmsPollException - java.rmi.RemoteException - if an exception occurs during remote call
boolean removePolledDataForNode(java.lang.String ipaddr,
java.lang.String key)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
ipaddr - the IP address for which the PolledData is to be removed.key - the key of the PolledData to be removed.
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
boolean removePolledDataForNodes(java.lang.String[] ipaddr,
java.lang.String key)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
ipaddr - list containing the IP addresses for which the PolledData is
to be removed.key - the key of the PolledData to be removed.
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
boolean removePolledDataForNodes(java.lang.String startip,
java.lang.String endip,
java.lang.String netmask,
java.lang.String key)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
startip - The starting ip address.endip - The ending ip address.netmask - The netmask.key - the key of the PolledData to be removed.
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 -
boolean startDataPoll()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
boolean stopDataPoll()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
java.util.Vector getActivePollers()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
boolean isPollerActive(java.lang.String pollerName)
throws java.rmi.RemoteException
pollerName - Name of the remote poller whose status to be
checked as String.
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
void shutDownPoller(java.lang.String pollerName)
throws java.rmi.RemoteException
pollerName - Name of the remote poller to be shut down
as String.
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
void shutDownAllPollers()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
boolean addThresholdObject(ThresholdObject obj)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
obj - ThresholdObject which has to be added.
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.
boolean modifyThresholdObject(ThresholdObject obj)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
obj - ThresholdObject with the properties to be modified.
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.
boolean deleteThresholdObject(java.lang.String name)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
name - name of the thresholdObject to be deleted.
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.
java.util.Vector getAllThresholdObjects()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
void setDebugMode(boolean debug)
throws java.rmi.RemoteException
debug - indicates whether to set debugging mode or not.
java.rmi.RemoteException - if an exception occurs during remote call
CollectedData getCollectedValues(java.lang.String key,
long timeStart,
long timeEnd)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.oidtimeStart - 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.
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.
CollectedData getCollectedValues(java.lang.String key,
long timeStart)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.oidtimeStart - The starting time from when the collected data
is required. The time is given as a long.
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.
void addPollingObject(PollingObject po,
boolean updateOldMOs)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
updateOldMOs to true)
unless it is absolutely necessary.
po - PollingObject to be added.updateOldMOs - a boolean value specifying whether this Polling Object
has to be applied to already discovered ManagedObjects or not.
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
void modifyPollingObject(PollingObject po,
boolean updateOldMOs)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
updateOldMOs and the value of PASS_THRO_ALL_POLLING_OBJECTS
given in NmsProcessesBE.conf.updateOldMOs
is false , it will be applicable only
to ManagedObjects which get discovered later.
updateOldMOs
is true and PASS_THRO_ALL_POLLING_OBJECTS is false,
old ManagedObjects for which polling has been configured as per this PollingObject
will be taken , and the new oids will be added.
updateOldMOs is true and PASS_THRO_ALL_POLLING_OBJECTS is true,
all the existing ManagedObjects will be checked out and PolledDatas
will be added to all these ManagedObjects.
updateOldMOs to true)
unless it is absolutely necessary.
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.
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
void modifyPropForPollingObject(java.lang.String name,
java.util.Properties prop,
boolean updateMOs)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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 .
name - name of the PollingObjectprop - 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).
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 outPollingObject
void deletePropForPollingObject(java.lang.String name,
java.lang.String key)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.
name - name of the PollingObjectkey - key of the oid
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 outPollingObject
void deletePollingObject(java.lang.String name)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
name is passed as a
parameter from Polling Engine. Also all the PolledDatas corresponding
to this PollingObject will be deleted.
name - name of the PollingObject to be deleted.
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
PollingObject getPollingObject(java.lang.String name)
throws java.rmi.RemoteException,
NmsPollException
name - name of the PollingObject to be retrieved.
java.rmi.RemoteException - if an exception occurs during remote call
NmsPollException - if an exception occurs while getting PollingObject.
java.util.Vector getPollingObjects()
throws java.rmi.RemoteException,
NmsPollException
java.rmi.RemoteException - if an exception occurs during remote call
NmsPollException - if an exception occurs while getting Polling Objects.PollingObject
void setPollingObjectStatus(java.lang.String name,
boolean status)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.
name - name of the PollingObject whose status is to be set.status - status of PollingObject whether true or false.
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 outPollingObject,
getPollingObjectStatus(java.lang.String)
boolean getPollingObjectStatus(java.lang.String name)
throws java.rmi.RemoteException,
NmsPollException
name is
passed as a parameter to this method.
name - name of the Polling Object.
java.rmi.RemoteException - if an exception occurs remote call
NmsPollException - if an exception occurs while getting status.PollingObject,
setPollingObjectStatus(java.lang.String, boolean)
void addPollFilter(java.lang.String className)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
PollFilter interface.
className - fully qualified class name of the Poll Filter .
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 outPollFilter
void deletePollFilter(java.lang.String className)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
className - fully qualified class name of the poll filter to be deleted
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 outPollFilter
java.util.Hashtable getThreshHashOfOid()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
void addReport(ReportObject ro)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.,
ro - The ReportObject to be added.
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 outscheduleReport(String,long),
Reporter
void deleteReport(java.lang.String name)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
name is passed as a parameter.
name - name of the report to be deleted.
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 outReportObject
void scheduleReport(java.lang.String name,
long timeval)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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).
name - name of the report to be scheduled.timeval - the time in milliseconds at which the report should be run.
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 outReportObject
void register(PollUnitObserver pdObs)
throws java.rmi.RemoteException,
NmsPollException
pdObs - a PollUnitObserver Observer which needs
to get the notification.
java.rmi.RemoteException - if an exception occurs during remote call.
NmsPollException - if an exception occurs during registering.
void deRegister(PollUnitObserver pdObs)
throws java.rmi.RemoteException,
NmsPollException
pdObs - instance of a PollUnitObserver. Observer
that was getting notifications.
java.rmi.RemoteException - if an exception occurs during remote call.
NmsPollException - if an exception occurs during registering.
void addProtocolProvider(java.lang.String protocol,
ProtocolProvider prov)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
protocol.
protocol - String for which provider is added.prov - a ProtocolProvider class for this protocol.
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
void deleteProtocolProvider(java.lang.String protocol)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
protocol - name of the protocol for which the provider is deleted.
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 outProtocolProvider
void addCreateSchema(java.lang.String tableName,
java.lang.String schema)
throws UserTransactionException,
NmsStorageException,
java.rmi.RemoteException
createTable(String) and
then this table name can be associated with any PolledData.
tableName - name of the tableschema - String which is used to create the table
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 outcreateTable(String),
PolledData,
PolledData.setStatsDataTableName(String)
java.lang.String getCreateSchema(java.lang.String tableName)
throws java.rmi.RemoteException
tableName - name of the table for which schema is returned.
java.rmi.RemoteException - if an exception occurs during remote call
void createTable(java.lang.String tableName)
throws UserTransactionException,
NmsStorageException,
java.rmi.RemoteException
tableName - the name of the table which should be created.
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 outaddCreateSchema(String,String)
PolledData checkOut(java.lang.String key)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
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.
key - The unique key of the PolledData to be checked out
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 callcheckOut(String,int)
PolledData checkOut(java.lang.String key,
int timeOut)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
key - The unique key of the PolledData to be checked outtimeOut - Time in seconds to wait, if the object is
locked by some other thread.
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 callcheckOut(String)
PolledData checkOutIfAvailable(java.lang.String key)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
key - The unique key of the PolledData to be checked out
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
PolledData lock(PolledData obj,
int lock_type,
int timeout)
throws java.rmi.RemoteException,
NmsPollException
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.
java.rmi.RemoteException - if an exception occurs during remote call.
NmsPollException - if an exception occurs during locking.LockableObject
void unlock(PolledData obj)
throws java.rmi.RemoteException,
NmsPollException
obj - The PolledData that is to be unlocked.
java.rmi.RemoteException - if an exception occurs during remote call.
NmsPollException - if an exception occurs during unlock.LockableObject
boolean checkWritePermission(PolledData obj)
throws java.rmi.RemoteException,
NmsPollException
obj - The PolledData instance that is to be checked whether
it has a write lock.
java.rmi.RemoteException - if an exception occurs during remote call.
NmsPollException - if an exception occurs while checking the
permission for writing.LockableObject
int getCurrentLockType(PolledData obj)
throws java.rmi.RemoteException,
NmsPollException
obj - PolledData instance for which the lock type is to be
obtained.
java.rmi.RemoteException - if an exception occurs during remote call.
NmsPollException - if an exception occurs while getting the lock
type.
void clearLockForObject(java.lang.String name,
int lockType)
throws UserTransactionException,
NmsPollException,
java.rmi.RemoteException
name - Name of the PolledData to be unlocked.lockType - Type of the lock to be unlocked.
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.
boolean removePoll(PolledData pd,
boolean dealWithLocks)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
pd - PolledData object which is to be deleted.dealWithLocks - boolean suggesting whether to check for
locking or not.
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
void modifyPoll(PolledData pdata,
boolean dealWithLocks)
throws java.rmi.RemoteException,
NmsPollException,
UserTransactionException
pdata - The PolledData object to be modified.dealWithLocks - boolean to check for locking.
UserTransactionException - if there is any exception while
doing transaction operations.
NmsPollException - if ,java.rmi.RemoteException - if an exception occurs during remote call.
void obtainPollerSpecificPolledData(java.lang.String name,
long startId)
throws java.rmi.RemoteException
name - Name of the Remote Poller as String.startId - The starting Id of the polledDatas to be fetched.
java.rmi.RemoteException - if an exception occurs during remote callRemotePoller
java.util.Hashtable getDynamicTablesAndSchemas()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call
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
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.
Now the
Properties criteria = new Properties();
criteria.put("agent","a*");
String fetchProperties = {"name","active","period"};
Vector PDVector = pollAPI.getObjectPropsWithProps("PolledData",fetchProperties,criteria,true,false);
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.
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 fetchPropertiesperformOr - if true, does a OR operation on the properties in criteria Properties else AND of the criteria.
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.
long getUpdateTime()
throws java.rmi.RemoteException
java.rmi.RemoteException - if an exception occurs during remote call.
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||