|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This API is for accessing and managing Alert objects in the Alert Database. It contains necessary methods for adding and removing AlertListeners and for registering and deregistering of AlertObservers. Various Alert related operations like clearing,deleting and picking/unpicking of Alerts, can be done using this API's methods. Moreover, this API has necessary methods for getting Annotation and History for Alert objects.
This API is accessible either through RMI or directly from the same JVM. When RMI is enabled, i.e. by running RMI registry before starting NMS server, AlertAPI can be accessed remotely via RMI.
The following code snippet can be used to get AlertAPI handle in secured and authenticated mode through RMI. In this mode, NMS needs userName and password to provide AlertAPI handle.
try
{
RMIAccessAPI rmiapi = (RMIAccessAPI)Naming.lookup("//hostName/RMIAccessAPI");
AlertAPI api = (AlertAPI)rmiapi.getAPI("userName","password","AlertAPI");
}
catch(Exception ee)
{
System.out.println("Error in getting AlertAPI handle");
ee.printStackTrace();
}
The following code snippet can be used to get AlertAPI handle through RMI, without RMI security mechanism of NMS.
try
{
AlertAPI api = (AlertAPI)Naming.lookup("//hostName/AlertAPI");
}
catch(Exception ee)
{
System.out.println("Error in getting AlertAPI handle");
ee.printStackTrace();
}
For the same JVM as that of WebNMS server,
NmsUtil.getAPI(String) can be used to get AlertAPI handle.
| Method Summary | |
boolean |
addAlertListener(AlertListener obs)
This method adds the given AlertListener into WebNMS so that it will get notification while about various alert related operations perfomed in NMS. |
void |
addAnnotation(AlertAnnotation altHistory)
To add AlertAnnotation object to the Alert object which is specified by the entity field of the given object. |
Alert |
checkOut(java.lang.String entity,
int timeOut)
This method checks out the Alert with the given entity from the database for writing, with a write lock. |
Alert |
checkOutIfAvailable(java.lang.String entity)
This method checks out the Alert with the given entity from the database for writing, with a write lock. |
boolean |
checkWritePermission(Alert obj)
Checks whether this instance of the AlertObject can be updated. |
void |
clearAlert(Alert alert)
Deprecated. This method has been deprecated as of WebNMS2.2. Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use clearAlert(Alert alert,boolean dealWithLock)
to clear that Alert. Use unlock(Alert alt) to unlock the checked out object. |
void |
clearAlert(Alert alert,
boolean dealWithLock)
Clears the alert. |
void |
clearAlert(java.lang.String entity)
Deprecated. Deprecated as of WebNMS2.3 Because complete Alert object is needed to lock that object during this operation. Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use clearAlert(Alert entity,boolean dealWithLock)
to clear that Alert. Use unlock(Alert alt) to unlock the checked out object. |
void |
clearLockForObject(java.lang.String entity,
int lockType)
Releases the specified lock type unconditionally for the AlertObject with the given entity. |
void |
deleteAlert(Alert alert)
Deprecated. This method has been deprecated as of WebNMS2.2. Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use deleteAlert(Alert alert,boolean dealWithLock)
to delete that Alert. |
void |
deleteAlert(Alert alert,
boolean dealWithLock)
Deletes given alert from WebNMS. |
void |
deleteAlert(java.lang.String entity)
Deprecated. Deprecated as of WebNMS2.3. Because complete Alert object is needed to lock that object during this operation. Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use deleteAlert(Alert entity,boolean dealWithLock)
to delete that Alert. |
void |
deleteAlertAnnotation(java.lang.String entity)
To delete all AlertAnnotation objects for an Alert Object which is specified by
the given entity. |
void |
deleteAlertHistory(java.lang.String entity)
To delete all AlertHistory for an Alert Object which is specified by the
given entity. |
boolean |
deregisterForAlerts(AlertObserver obs)
Deprecated. as of WebNMS 2.3. Since usage of AlertListener is suggested
over the usage of AlertObserver |
Alert |
getAlert(java.lang.String entity)
Deprecated. as of WebNMS2.3. Use checkOutIfAvailable(String entity) to
get locked Alert object with the specified entity. Use unlock(Alert alt) to
unlock the checked out object. |
int |
getAlertCount(java.lang.String[] category,
int severity)
Returns the number of alerts with the specified array of categories and severity. |
int |
getAlertCount(java.lang.String category,
int severity)
Returns the number of alerts in WebNMS with the given category and severity |
java.util.Properties |
getAlertModuleParams()
Gets the Alert Module parameters and their values in java.util.Properties object. |
int |
getAlertQueueSize()
No of events in the queue which need to be processed as Alerts. |
java.util.Vector |
getAlerts(Alert alert)
Deprecated. This method has been deprecated as of WebNMS2.0 |
java.util.Vector |
getAlerts(Alert alert1,
Alert alert2)
This will get all alerts matching the properties in the first parameter alert1 Alert object and between the time specified in the first and second parameter alert2 Alert object. |
java.util.Vector |
getAlertsBasedOnGroupViewMode()
For internal use only. |
int |
getAlertsCount(int severity)
Returns the number of alerts with given severity in the WebNMS System. |
java.util.Vector |
getAnnotation(java.lang.String entity)
This method gets the complete set of AlertAnnotation Objects in a Vector for a
particular Alert which is specified by the given entity. |
java.lang.String |
getAnnotationNotes(java.lang.String entity)
Deprecated. This method has been deprecated as of WebNMS2.2. For higher versions, use getAnnotation(String entity) and getHistory(String entity)
which will return Vector of AlertAnnotation and AlertHistory objects
respectively. |
int |
getClearAlertsCount()
Returns the number of alerts with Clear severity in the WebNMS System. |
int |
getCriticalAlertsCount()
Deprecated. This method has been deprecated as of Web NMS 2.1. For higher versions, use getAlertsCount(int severity) method to
get the count of alerts of any given severity. The method
has been deprecated to support configurable number of severities. |
int |
getCurrentLockType(Alert obj)
Get the lock type currently held by the specified instance of the AlertObject. |
java.lang.String |
getGroupViewMode()
Returns the value of the parameter GROUP_VIEW_MODE which is the command line argument for EventMgr process which can either be max ,latest or none. |
java.util.Vector |
getHistory(java.lang.String entity)
This method gets the complete set of AlertHistory Objects in a Vector for a
particular Alert which is specified by the given entity. |
int |
getMajorAlertsCount()
Deprecated. This method has been deprecated as of Web NMS 2.1. For higher versions, Use getAlertsCount(int severity) method to
get the count of alerts of any given severity. This method
has been deprecated to support configurable number of severities. |
int |
getMaxSeverityofAlerts()
This method returns the associated integer value of the maximum severity alert that is pending(or present) in the Web NMS system. |
int |
getMinorAlertsCount()
Deprecated. This method has been deprecated As of Web NMS 2.1. Use getAlertsCount(int severity) method to
get the count of alerts of any given severity. The method
has been deprecated to support configurable number of severities. |
java.util.Vector |
getNextAlertBasedOnGroupViewMode(java.lang.String groupName)
For internal use only. |
Alert |
getNextAlertBasedOnModtime(java.lang.String entity)
This method returns the Alert generated or modified, next to the Alert whose 'entity' field is passed as a parameter. |
java.util.Vector |
getObjects(java.lang.String classname,
java.util.Properties match)
Returns a vector of alert objects that belong to the specified classname. |
Alert |
getOldestModifiedAlert()
This method returns oldest modified Alert. |
int |
getTotalAlertCount()
Returns Total number of Alerts in the WebNMS system. |
int |
getTotalAlertCount(java.lang.String category)
Returns the total number of alerts with the specified category |
int |
getTotalAlertCount(java.lang.String[] category)
Returns the total number of alerts with the specified array of categories |
int |
getWarningAlertsCount()
Deprecated. This method has been deprecated As of Web NMS 2.1. Use getAlertsCount(int severity) method to
get the count of alerts of any given severity. The method
has been deprecated to support multiple severities. |
boolean |
isDatabaseMode()
Deprecated. This method has been deprecated as of WebNMS2.3, since WebNMS supports only database mode |
Alert |
lock(Alert obj,
int lock_type,
int timeout)
This method will lock the specified Alert, by applying the given type of lock, which will actually define access levels for the object. |
void |
pauseFilterAction(java.lang.String[] runnableClassName)
This method can be used to pause the filter action thread at runtime which is running. |
void |
pickUpAlert(Alert alert,
java.lang.String who)
Deprecated. This method has been deprecated as of WebNMS2.2. Users are suggested to use checkOutIfAvailable(String) to get the Alert object
and after getting Alert object use pickUpAlert(Alert,String,boolean)
to pickup that Alert. Use unlock(Alert alt) to unlock the checked out object. |
void |
pickUpAlert(Alert alert,
java.lang.String who,
boolean dealWithLock)
Picks up an alert. |
void |
pickUpAlert(java.lang.String entity,
java.lang.String who)
Deprecated. Deprecated as of WebNMS2.3. Because complete Alert object is needed to lock that object during this operation. Users are suggested to use checkOutIfAvailable(String) to get the Alert object
and after getting Alert object use pickUpAlert(Alert,String,boolean)
to pickup that Alert. Use unlock(Alert alt) to unlock the checked out object. |
void |
purgeAlertDB()
Deletes all the alerts in the WebNMS. |
boolean |
registerForAlerts(AlertObserver obs)
Deprecated. as of WebNMS 2.3. Since usage of AlertListener is suggested
over the usage of AlertObserver |
boolean |
removeAlertListener(AlertListener obs)
To remove the AlertListener that has been already added by the previous method. |
void |
resumeFilterAction(java.lang.String[] runnableClassName)
This method can be used to resume the filter action thread at runtime which has been paused. |
void |
saveAlertState()
Deprecated. This method has been deprecated as of WebNMS2.3, since WebNMS supports state less server |
void |
setAlertModuleParams(java.util.Properties prop)
Sets the Alert Module Parameters. |
boolean |
setAutoCommit(boolean b)
Deprecated. This method has been deprecated as WebNMS2.3, since there is not separate database connection for Fault module |
void |
unlock(Alert obj)
Unlock the specified AlertObject. |
void |
unPickAlert(Alert alert,
java.lang.String who,
boolean dealWithLock)
This method unpicks the alert, if it is already picked up by an user. |
void |
unPickAlert(java.lang.String entity,
java.lang.String who)
Deprecated. Deprecated as of WebNMS2.3. Because complete Alert object is needed to lock that object during this operation. Users are suggested to use checkOutIfAvailable(String) to get the Alert object
and after getting Alert object use unPickAlert(Alert,String,boolean)
to unpick that Alert. Use unlock(Alert alt) to unlock the checked out object. |
boolean |
updateAlert(Alert alert)
Updates the Alert, matching the entity as that of the alert passed as a parameter to the method. |
boolean |
updateAlert(Alert alert,
boolean dealWithLock)
Updates the Alert, matching the entity as that of the alert passed as a parameter to the method. |
void |
updateNotes(Alert alert,
java.lang.String notes)
Deprecated. This method has been deprecated as of WebNMS2.1. Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert. |
void |
updateNotes(Alert alert,
java.lang.String userName,
java.lang.String notes)
Deprecated. This method has been deprecated as of WebNMS2.1. Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert. Use unlock(Alert alt) to unlock the
checked out object. |
void |
updateNotes(Alert alert,
java.lang.String userName,
java.lang.String notes,
boolean dealWithLock)
To add annotation notes to the Alert. |
void |
updateNotes(java.lang.String entity,
java.lang.String notes)
Deprecated. This method has been deprecated as of WebNMS2.2. Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert. Use unlock(Alert alt) to unlock the
checked out object. |
void |
updateNotes(java.lang.String entity,
java.lang.String userName,
java.lang.String notes)
Deprecated. Deprecated as of WebNMS2.3, Users are suggested to use checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert. Use unlock(Alert alt) to unlock the
checked out object. |
| Methods inherited from interface com.adventnet.nms.util.CommonAPI |
getCompleteList, getObjectNamesWithProps, getPropertiesOfObject |
| Method Detail |
public void pickUpAlert(Alert alert,
java.lang.String who)
throws java.rmi.RemoteException
checkOutIfAvailable(String) to get the Alert object
and after getting Alert object use pickUpAlert(Alert,String,boolean)
to pickup that Alert. Use unlock(Alert alt) to unlock the checked out object.
who field of Alert object alone changes.alert - The Alert Object to be picked up.who - name of the user who is picking up the Alertjava.rmi.RemoteException - if request fails in remote machinepickUpAlert(Alert alt,String user,boolean dealWithLock)
public void pickUpAlert(Alert alert,
java.lang.String who,
boolean dealWithLock)
throws java.rmi.RemoteException,
AccessDeniedException,
UserTransactionException,
FaultException
who field of Alert object alone changes.
Alert observers and Alert Listerners will be notified about this operation.
To avoid data inconsistency the user is recommended to get the locked alert object
using checkOutIfAvailable(String entity) method and then set the value of
boolean dealWithLock as 'true'. After required action is performed, user has to unlock the
Alert Object by unlock(Alert obj).
Note : FaultException will not be thrown when there is some problem while adding Alert annotation entry into ANNOTATION table.
alert - The Alert Object to be picked up.who - name of the user who is picking up the AlertdealWithLock - provides concurrency control for the Alert Object which is passed
as one of the arguments of this method. When the parameter ALERT_LOCK is set to 'true' and
this boolean is set as 'true', then this pick up operation over the Alert object passed as a
parameter will be thread safe.java.rmi.RemoteException - if request fails in remote machineAccessDeniedException - if the object is already locked by some other
thread and is not available for writing.UserTransactionException - if there is any exception while making the transactionFaultException - wrapper for all other module level exceptionsunPickAlert(Alert alert,String who,boolean dealWithLock)
public void pickUpAlert(java.lang.String entity,
java.lang.String who)
throws java.rmi.RemoteException
checkOutIfAvailable(String) to get the Alert object
and after getting Alert object use pickUpAlert(Alert,String,boolean)
to pickup that Alert. Use unlock(Alert alt) to unlock the checked out object.
who field of Alert object alone changes.entity - The 'entity' field of the Alert object to be picked up.who - name of the user who is picking up the Alertjava.rmi.RemoteException - if error occurs in Remote machinepickUpAlert(Alert alt,String who,boolean dealWithLock)
public void unPickAlert(java.lang.String entity,
java.lang.String who)
throws java.rmi.RemoteException
checkOutIfAvailable(String) to get the Alert object
and after getting Alert object use unPickAlert(Alert,String,boolean)
to unpick that Alert. Use unlock(Alert alt) to unlock the checked out object.
who field of Alert object alone changes.entity - The entity of the Alert object to be picked up.who - The user name who unpicks the alertjava.rmi.RemoteException - unPickAlert(Alert alert,String who,boolean dealWithLock)
public void unPickAlert(Alert alert,
java.lang.String who,
boolean dealWithLock)
throws java.rmi.RemoteException,
AccessDeniedException,
UserTransactionException,
FaultException
who field of Alert object alone changes.
Alert observers and Alert Listerners will be notified about this operation.
To avoid data inconsistency the user is recommended to get the locked alert object
using checkOutIfAvailable(String entity) method and then set the value of
boolean dealWithLock as 'true'. After required action is performed, user has to unlock the
Alert Object by unlock(Alert obj).
Note : FaultException will not be thrown when there is some problem while adding Alert annotation entry into ANNOTATION table.
alert - The Alert object to be picked up.who - The user name who unpicking the alertdealWithLock - provides concurrency control for the Alert Object
passed as one of the argument here. When the parameter ALERT_LOCK is set to 'true' and
this boolean is set as 'true', then this unpick up operation over the Alert object passed as a
parameter will be thread safe.AccessDeniedException - if the object is locked by some other
thread and is not available for writing.java.rmi.RemoteException - if request fails in remote machineUserTransactionException - if there is any exception while making the transactionFaultException - wrapper for all other module level exceptionspickUpAlert(Alert alert,String who,boolean dealWithLock)
public Alert getAlert(java.lang.String entity)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to
get locked Alert object with the specified entity. Use unlock(Alert alt) to
unlock the checked out object.
entity field matches with the
given entity.entity - Entity field of the Alert Object to be obtainedjava.rmi.RemoteException - if request fails in remote machinecheckOutIfAvailable(String entity),
checkOut(String entity,int timeOut)
public java.util.Vector getAlerts(Alert alert)
throws java.rmi.RemoteException
The values set for the String based properties in parameter alert can take wildCard character * which stands for its well known purpose. The String based properties can also accept values that starts with character ! which stands for negation operation while matching. They can also accept ,(comma) seperated values which can match any one of the values seperated by comma.
Example criteria for String based properties:
1. WebNMS* - matches values startswith WebNMS
2. *WebNMS - matches values endswith WebNMS
3. !WebNMS - matches values that does not start with WebNMS
4. Node,Interface,Snmp - matches any value that startwith
any of the mentioned string
The values set for Numeric properties can only match the exact value given for the property in Alert object passed namely alert. For the properties modTime and createTime, this method will return all the Alerts whose modTime or createTime is greater than that of the given Alert's modTime or createTime respectively.
alert - The alert object whose properties are used for filtering alerts.java.rmi.RemoteException - in request fails in remtoe machinegetAlerts(Alert alert1,Alert alert2),
CommonAPI.getObjectNamesWithProps(Properties),
CommonAPI.getPropertiesOfObject(String),
CommonAPI.getCompleteList()
public java.util.Vector getAlerts(Alert alert1,
Alert alert2)
throws java.rmi.RemoteException,
FaultException
The values set for the String based properties in first Alert can take wildCard character * which stands for its well known purpose. The String based properties can a also accept values that starts with character ! which stands for negation operation while matching. They can also accept ,(comma) seperated values which can match any one of the values seperated by comma.
Example criteria for String based properties:
1. WebNMS* - matches values startswith WebNMS
2. *WebNMS - matches values endswith WebNMS
3. !WebNMS - matches values that does not start with WebNMS
4. Node,Interface,Snmp - matches any value that startwith any of
the mentioned string
The values set for Numeric properties can only match the exact value given for the property in alert object passed, namely alert1.
For the properties modTime and createTime the matching would take place as follows.
1. modTime specified both in alert1 and alert2.
Matches the Alert whose modTime greater than that specified in alert1
and less than specifed in alert2
2. modTime specified only in alert1 and not in alert2:
Matches the Alert whose modTime greater than specifed in alert1
3. modTime specified only in alert2 and not in alert1:
Matches the Alert whose modTime less than specified in alert2
4. modTime not specified in both alert2 and alert1:
modTime will not be taken as a filtering criteria
The same matching mechanism will be followed for the property createTime
alert1 - The Alert object whose properties are used for filtering events.
The time field indicates filtering all Alerts whose time is after the
time indicated in this Alert.alert2 - The time field indicates filtering all alerts whose time is before the
time indicated in this Alert.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while fetching the alerts
matching the propertiesCommonAPI.getObjectNamesWithProps(Properties),
CommonAPI.getPropertiesOfObject(String),
CommonAPI.getCompleteList()
public java.lang.String getAnnotationNotes(java.lang.String entity)
throws java.rmi.RemoteException
getAnnotation(String entity) and getHistory(String entity)
which will return Vector of AlertAnnotation and AlertHistory objects
respectively.
entity - The unique entity name of the Alert.java.rmi.RemoteException - if request fails in remote machineaddAnnotation(AlertAnnotation)
public void deleteAlert(Alert alert,
boolean dealWithLock)
throws java.rmi.RemoteException,
AccessDeniedException,
UserTransactionException,
FaultException
none history annotation both
If ON_DELETING_ALERT_DELETE is set to none, both history and annotation will not be deleted while deleting Alert. If it is set to annotation, only annotation will be deleted while deleting Alert. It it is set to history, only history will be deleted. Both history and annotation will be deleted if the parameter is is set to both Alert observers and Alert Listerners will be notified about this operation.
If the Alert is deleted, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is deleted, then that Managed object will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then it will reflect clear status. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object.
To delete the Alert after locking the Alert object, user
has to get the locked alert object by checkOutIfAvailable(String entity)
method and then set the value of dealWithLock as true.
Note: Unlike other operations, there is no need to unlock the Alert object after the delete operation is completed. Once the Alert is deleted from database, corresponding lock will be removed by WebNMS automatically.
Note : FaultException will not be thrown when there is some problem while adding Alert history entry into ANNOTATION table.
alert - The Alert object to be deleteddealWithLock - provides concurrency control for the Alert Object passed
as an argument.AccessDeniedException - if the object is locked by some other
thread and is not available for writing.java.rmi.RemoteException - if request fails in remote machineUserTransactionException - if there is any exception while making the transactionFaultException - wrapper for all other module level exceptions
public void deleteAlert(Alert alert)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use deleteAlert(Alert alert,boolean dealWithLock)
to delete that Alert.
none history annotation both
If ON_DELETING_ALERT_DELETE is set to none, both history and annotation won't be deleted while deleting Alert. If it is set to annotation, only annotation will be deleted while deleting Alert. It it is set to history, only history will be deleted. Both history and annotation will be deleted it the parameter is is set to both
If the Alert is deleted, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is deleted, that Managed Object will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then it will reflect clear status. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object.
alert - The Alert object to be deletedjava.rmi.RemoteException - if request fails in remote machinedeleteAlert(Alert alert,boolean dealWithLock)
public void deleteAlert(java.lang.String entity)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use deleteAlert(Alert entity,boolean dealWithLock)
to delete that Alert.
none history annotation both
If ON_DELETING_ALERT_DELETE is set to none, both history and annotation won't be deleted while deleting Alert. If it is set to annotation, only annotation will be deleted while deleting Alert. It it is set to history, only history will be deleted. Both history and annotation will be deleted it the parameter is is set to both
If the Alert is deleted, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is deleted, that will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then that Managed Object will reflect clear status. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object.
entity - The entity of the alert object to be deleted.java.rmi.RemoteException - if request fails in remote machinedeleteAlert(Alert alert,boolean dealWithLock)
public void clearAlert(Alert alert)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use clearAlert(Alert alert,boolean dealWithLock)
to clear that Alert. Use unlock(Alert alt) to unlock the checked out object.
If the Alert is cleared, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is cleared, that will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then it will reflect clear status. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object.
alert - The Alert Object whose status is to be cleared.java.rmi.RemoteException - if request fails in remote machineclearAlert(Alert alert,boolean dealWithLock)
public void clearAlert(Alert alert,
boolean dealWithLock)
throws java.rmi.RemoteException,
AccessDeniedException,
UserTransactionException,
FaultException
If the Alert is cleared, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is cleared, that will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then it will reflect clear status. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object. Alert observers and Alert Listerners will be notified about this operation.
To avoid data inconsistency the user is recommended to get the locked alert object
using checkOutIfAvailable(String entity) method and then set the value of
boolean dealWithLock as 'true'. After required action is performed, user has to unlock the
Alert Object by unlock(Alert obj).
Note : FaultException will not be thrown when there is some problem while adding Alert history entry into ANNOTATION table.
alert - The Alert Object whose status is to be cleared.dealWithLock - provides concurrency control for the Alert Object passed
as an argument here. When the parameter ALERT_LOCK is set to 'true' and
this boolean is set as 'true', then this clear operation over the Alert object passed as a
parameter will be thread safe.AccessDeniedException - if the object is locked by some other
thread and is not available for writing.java.rmi.RemoteException - if request fails in remote machine.UserTransactionException - if there is any exception while making to the
transactionFaultException - wrapper for all other module level exceptionspickUpAlert(Alert alert,String who,boolean dealWithLock)
public void clearAlert(java.lang.String entity)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use clearAlert(Alert entity,boolean dealWithLock)
to clear that Alert. Use unlock(Alert alt) to unlock the checked out object.
If the Alert is cleared, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is cleared, that will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then it will reflect clear status. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object.
entity - The entity of the Alert Object whose status is to be cleared.java.rmi.RemoteException - if request fails in remote machineclearAlert(Alert alert,boolean dealWithLock)
public boolean updateAlert(Alert alert)
throws java.rmi.RemoteException,
UserTransactionException,
FaultException
The user should note that the severity value of the alert object passed should not be equal to that of any NO-CRITICAL severities defined in the Web NMS system, as well as that of the Special Purpose severity defined. Similarly, the entity and the source field cannot be null, in which case the method call will fail.
The user can modify all the properties except that of PreviousSeverity(alert previous severity) and modTime(alert Modified time). The previous severity will be set from the severity of the existing alert and the modified time will be determined by the Web NMS server, which will update it with the exact time of modification.
If the Alert is updated, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is updated, Managed Object will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then it will reflect status of the updated Alert. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object.
The method will return a value true, if the updation is successfull or else false will be returned.
Note : FaultException will not be thrown when there is some problem while adding Alert history entry into ANNOTATION table.
alert - The alert object by which the existing alert which has same
matching entity will be updated with. entity or source
fields of the Alert object is null or no Alert is there in WebNMS
with the corresponding entity java.rmi.RemoteException - if request fails in remote machineUserTransactionException - if there is any exception while making the transaction
for update the alertFaultException - wrapper for all other module level exceptionsupdateAlert(Alert alert,boolean dealWithLock)
public boolean updateAlert(Alert alert,
boolean dealWithLock)
throws java.rmi.RemoteException,
AccessDeniedException,
UserTransactionException,
FaultException
To avoid data inconsistency the user is recommended to get the locked alert object
using checkOutIfAvailable(String entity) method and then set the value of
boolean dealWithLock as 'true'. After required action is performed, user has to unlock the
Alert Object by unlock(Alert obj).
The user can modify all the properties except that of PreviousSeverity (alert previous severity) and modTime(alert Modified time). The previous severity will be set from the severity of the existing alert and the modified time will be determined by the Web NMS server, which will update it with the exact time of modification.
If the Alert is updated, corresponding Managed Object will be updated based on ALERT_TO_MANAGEDOBJECT_PROPOGATION parameter against EventMgr process in NmsProcessesBE.conf file, this parameter can have any one of the following values
max latest noneIf ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to none, Managed Object will not be updated by Alerts. If it is set to max, Managed Object will reflect the maximum severity of Alerts belongs to that Manged Object. If the Alert belongs to that Managed Object is updated, Managed Object will be updated by the maximum severity of the remaining Alerts. If there is no more Alerts for that Managed Object, then it will reflect status of the updated Alert. If ALERT_TO_MANAGEDOBJECT_PROPOGATION is set to latest, Managed Object will reflect the status of latest Alert belongs to that Managed Object. Alert observers and Alert Listerners will be notified about this operation. The method will return a value true if the updation was successfull or else false will be returned.
Note : FaultException will not be thrown when there is some problem while adding Alert history entry into ANNOTATION table.
alert - The alert object with which the existing alert with the
same matching entity will be updated with.dealWithLock - provides concurrency control for the Alert Object passed
as an argument. When the parameter ALERT_LOCK is set to 'true' and
this boolean is set as 'true', then this update operation over the Alert object passed as a
parameter will be thread safe. entity or source
fields of the Alert object is null or no Alert is there in WebNMS
with the corresponding entity java.rmi.RemoteException - if request fails in remote machineAccessDeniedException - if the object is locked by some other
thread and is not available for writing.UserTransactionException - if there is any exception while making to the
transactionFaultException - wrapper for all other module level exceptionsclearAlert(Alert alert,boolean dealWithLock)
public void updateNotes(Alert alert,
java.lang.String userName,
java.lang.String notes,
boolean dealWithLock)
throws java.rmi.RemoteException,
AccessDeniedException,
UserTransactionException,
FaultException
checkOutIfAvailable(String entity) method and then
set the value of dealWithLock as true. After the required action is performed the user
has to unlock the Alert Object by unlock(Alert obj) method.
Alert observers and Alert Listerners will be notified about this operation.alert - The Alert object to which annotation has to be done.notes - The annotation textuserName - The name of the user who is adding the annotationdealWithLock - provides concurrency control for the Alert Object
passed as an argument. When the parameter ALERT_LOCK is set to 'true' and
this boolean is set as 'true', then this update notes operation over the Alert object passed as a
parameter will be thread safe.AccessDeniedException - if the object is locked by some other
thread and is not available for writing.java.rmi.RemoteException - if request fails in remote machineUserTransactionException - if there is any exception while making to the transactionFaultException - wrapper for all other module level exceptions
public void updateNotes(Alert alert,
java.lang.String notes)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert.
alert - The Alert object to which annotation has to be done.notes - The text which is to be used for annotation.java.rmi.RemoteException - if request fails in remote machineupdateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
public void updateNotes(Alert alert,
java.lang.String userName,
java.lang.String notes)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert. Use unlock(Alert alt) to unlock the
checked out object.
alert - The Alert object to which annotation has to be done.userName - The name of the user who is adding the annotationnotes - The text which is to be used for annotation.java.rmi.RemoteException - if request fails in remote machineupdateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
public void updateNotes(java.lang.String entity,
java.lang.String notes)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert. Use unlock(Alert alt) to unlock the
checked out object.
entity - The entity of the Alert to which annotation has to be done.notes - The text which is to be used for annotation.java.rmi.RemoteException - if request fails in remote machineupdateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
public void updateNotes(java.lang.String entity,
java.lang.String userName,
java.lang.String notes)
throws java.rmi.RemoteException
checkOutIfAvailable(String entity) to get the Alert object
and after getting Alert object use
updateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
to add annotation to that Alert. Use unlock(Alert alt) to unlock the
checked out object.
entity - The entity of the Alert to which annotation has to be done.userName - The name of the user who is adding the annotationnotes - The text which is to be used for annotation.java.rmi.RemoteException - if request fails in remote machineupdateNotes(Alert alert,String userName,String notes,boolean dealWithLock)
public int getMaxSeverityofAlerts()
throws java.rmi.RemoteException
java.rmi.RemoteException - When the api call fails via RMI.getTotalAlertCount(),
getAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public int getAlertsCount(int severity)
throws java.rmi.RemoteException
severity - The severity value of the alert as specified in the
SeverityInfo.conf file in the WebNMS/conf directory..java.rmi.RemoteException - when this API call fails via RMIgetTotalAlertCount(),
getAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public int getCriticalAlertsCount()
throws java.rmi.RemoteException
getAlertsCount(int severity) method to
get the count of alerts of any given severity. The method
has been deprecated to support configurable number of severities.
java.rmi.RemoteException - if API call fails via RMIgetAlertsCount(int severity),
getAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public int getMajorAlertsCount()
throws java.rmi.RemoteException
getAlertsCount(int severity) method to
get the count of alerts of any given severity. This method
has been deprecated to support configurable number of severities.
java.rmi.RemoteException - if API call fails via RMIgetAlertsCount(int),
getAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public int getMinorAlertsCount()
throws java.rmi.RemoteException
getAlertsCount(int severity) method to
get the count of alerts of any given severity. The method
has been deprecated to support configurable number of severities.
java.rmi.RemoteException - if API call fails via RMIgetAlertsCount(int),
getAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public int getWarningAlertsCount()
throws java.rmi.RemoteException
getAlertsCount(int severity) method to
get the count of alerts of any given severity. The method
has been deprecated to support multiple severities.
java.rmi.RemoteException - if API call fails via RMIgetAlertsCount(int),
getAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public int getClearAlertsCount()
throws java.rmi.RemoteException
java.rmi.RemoteException - if API call fails via RMIgetAlertsCount(int),
getAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public void saveAlertState()
throws java.rmi.RemoteException
java.rmi.RemoteException - if API call fails via RMI
public java.util.Vector getObjects(java.lang.String classname,
java.util.Properties match)
throws java.rmi.RemoteException,
FaultException
classname - Name of the class to which the object belongsmatch - The matching criteria in the form of Propertiesjava.rmi.RemoteException - if API call fails via RMIFaultException - if there is any exception while fetching
the objects with given criteriaCommonAPI.getObjectNamesWithProps(Properties),
CommonAPI.getPropertiesOfObject(String)
public boolean registerForAlerts(AlertObserver obs)
throws java.rmi.RemoteException
AlertListener is suggested
over the usage of AlertObserver
AlertObserver
interface and register that object with NMS by this method.obs - The AlertObserver interface implementor class
which will be notified about various alert related operations.java.rmi.RemoteException - if request fails in remote machinederegisterForAlerts(AlertObserver),
addAlertListener(AlertListener),
removeAlertListener(AlertListener),
AlertListener,
AlertActionInformer
public boolean deregisterForAlerts(AlertObserver obs)
throws java.rmi.RemoteException
AlertListener is suggested
over the usage of AlertObserver
obs - The AlertObserver that has to be deregistered.java.rmi.RemoteException - if request fails in remote machineregisterForAlerts(AlertObserver),
removeAlertListener(AlertListener),
addAlertListener(AlertListener),
AlertListener,
AlertActionInformer
public boolean setAutoCommit(boolean b)
throws java.rmi.RemoteException,
java.sql.SQLException
b - Decides the auto-commit modejava.rmi.RemoteException - if request fails in remote machineSQLException - When problem occurs dealing with DB
public boolean isDatabaseMode()
throws java.rmi.RemoteException
java.rmi.RemoteException - if request fails in remote machine
public java.lang.String getGroupViewMode()
throws java.rmi.RemoteException
This can be either "max","latest" or "none". If the group mode is "none", then the alerts are not grouped and all the alerts are shown separately.
If the group mode is "max", then the alert of maximum severity, out of all the alerts belonging to that group, represents that group.
If the group mode is "latest", then the latest alert from an alert group represents that group.
This method will return the group view mode set in the configuration file NmsProcessesBE as mentioned above.
This GROUP_VIEW_MODE parameter has no effect in server side. In client, Alerts are shown based on the value of this parameter.
java.rmi.RemoteException - if request fails in remote machine
public java.util.Vector getAlertsBasedOnGroupViewMode()
throws java.rmi.RemoteException,
FaultException
java.rmi.RemoteException - if request fails in remote machineFaultException - if there are any exceptions while fetching alerts
based on group view mode
public java.util.Vector getNextAlertBasedOnGroupViewMode(java.lang.String groupName)
throws java.rmi.RemoteException,
FaultException
groupName - The groupName field of Alert objectjava.rmi.RemoteException - if request fails in remote machineFaultException - if there are any exceptions while fetching next alert
based on group view mode
public int getTotalAlertCount()
throws java.rmi.RemoteException,
FaultException
java.rmi.RemoteException - if request fails in remote machineFaultException - if there are any exceptions while fetching total alerts countgetAlertCount(String category,int severity),
getAlertCount(String category[],int severity)
public int getAlertQueueSize()
throws java.rmi.RemoteException
java.rmi.RemoteException - if request fails in remote machine
public java.util.Vector getAnnotation(java.lang.String entity)
throws java.rmi.RemoteException,
FaultException
AlertAnnotation Objects in a Vector for a
particular Alert which is specified by the given entity.
The Vector will be arranged according to Annotation Object's modTime in ascending order.entity - The unique entity name of the Alert.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while getting the annotation detailsAlertAnnotation,
getHistory(String entity)
public java.util.Vector getHistory(java.lang.String entity)
throws java.rmi.RemoteException,
FaultException
AlertHistory Objects in a Vector for a
particular Alert which is specified by the given entity.
The Vector will be arranged according to History Object's modTime in ascending order.
If there is no AlertHistory Object for that entity, this method will return null.entity - The unique entity name of the Alert.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while getting the historyAlertHistory,
getAnnotation(String entity)
public void addAnnotation(AlertAnnotation altHistory)
throws java.rmi.RemoteException,
UserTransactionException,
FaultException
Alert and
AlertAnnotation objects are linked by entity field which
presents in both objects. WebNMS automatically sets the modTime
to current time in milliseconds. Hence usage
of AlertHistory.setModTime(long) should be avoided here.
Since History object is allowed to be added only by NMS, there is no such method
for AlertHistory.altHistory - Annotation which has to be added.java.rmi.RemoteException - if request fails in remote machineUserTransactionException - if there is any exception while
making the transactionFaultException - if there is any exception while adding to the annotationgetAnnotation(String entity),
AlertAnnotation,
AlertHistory
public void purgeAlertDB()
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
none history annotation both
If ON_DELETING_ALERT_DELETE is set to none, both history and annotation won't be deleted while deleting Alert. If it is set to annotation, only annotation will be deleted while deleting Alert. It it is set to history, only history will be deleted. Both history and annotation will be deleted it the parameter is is set to both. Before deleting Alerts, Alert Listeners will be notified about this operation.
Note: If Alerts are deleted through this method, ManagedObjects will not be updated.
java.rmi.RemoteException - if request fails in remote machineNmsStorageException - if any error occurs while updating the storage.UserTransactionException - if there is any exception while making the transactiondeleteAlert(Alert alert,boolean dealWithLock)
public Alert getNextAlertBasedOnModtime(java.lang.String entity)
throws java.rmi.RemoteException,
FaultException
entity - The entity field of Alert ObjectmodTime or currentTime whichever is applicablejava.rmi.RemoteException - if request fails in remote machineFaultException - if there are any exceptions while fetching next alert
based on modified timegetOldestModifiedAlert()
public void deleteAlertAnnotation(java.lang.String entity)
throws java.rmi.RemoteException,
FaultException,
UserTransactionException
AlertAnnotation objects for an Alert Object which is specified by
the given entity. Deleting all Alert annotation
of an Alert object, causes no effect in the fields of Alert object.entity - The entity field of Alert Object whose annotation needs to be deletedjava.rmi.RemoteException - if request fails in remote machineUserTransactionException - if there is any exception while making the transactionFaultException - if there is any exception while deleting the alert AnnotationgetAnnotation(String entity),
deleteAlertHistory(String entity)
public void deleteAlertHistory(java.lang.String entity)
throws java.rmi.RemoteException,
FaultException,
UserTransactionException
AlertHistory for an Alert Object which is specified by the
given entity. Deleting all Alert history
of an Alert object, causes no effect in the fields of the corresponding Alert object.entity - The entity field of Alert object whose History needs to be deleted.java.rmi.RemoteException - if request fails in remote machineUserTransactionException - if there is any exception while making the transactionFaultException - if there is any exception while deleting the
alert historygetAnnotation(String entity),
deleteAlertAnnotation(String entity)
public Alert getOldestModifiedAlert()
throws java.rmi.RemoteException,
NmsStorageException
modTime value.java.rmi.RemoteException - if request fails in remote machineNmsStorageException - When problem occurs getting the oldest modified AlertgetNextAlertBasedOnModtime(String entity)
public boolean addAlertListener(AlertListener obs)
throws java.rmi.RemoteException
TopoAPI.deleteObjectAndSubElements(String objkey)
method, the corresponding alerts also get deleted. As this deletion can not be
notified individually for each and every alert, a single notification will be given
with the necessary details for the users to handle the condition.
To receive notification when such bulk delete of Alert occurs, user written code has to
implement AlertListener interface and instance of the user written class
should register to WebNMS by this method. Also these listeners will be notified
whenever alert related operations like clear,delete,pickup,unpick and update
are performed in WebNMSobs - The user written class that implements AlertListenerjava.rmi.RemoteException - if request fails in remote machineAlertListener,
AlertActionInformer,
removeAlertListener(AlertListener)
public boolean removeAlertListener(AlertListener obs)
throws java.rmi.RemoteException
obs - The user written class that implements AlertListenerjava.rmi.RemoteException - if request fails in remote machineAlertListener,
AlertActionInformer,
addAlertListener(AlertListener)
public int getAlertCount(java.lang.String category,
int severity)
throws java.rmi.RemoteException,
FaultException
category - category of the Alertseverity - The severity value of the alert as specified in the
SeverityInfo.conf file in the WebNMS/conf directory..java.rmi.RemoteException - if request fails in remote machinegetTotalAlertCount(),
getTotalAlertCount(String category)
public int getTotalAlertCount(java.lang.String category)
throws java.rmi.RemoteException,
FaultException
category - category of the Alertjava.rmi.RemoteException - if request fails in remote machineFaultException - if there are any exceptions while fetching
alerts count for given categorygetTotalAlertCount(),
getAlertCount(String category,int severity)
public int getTotalAlertCount(java.lang.String[] category)
throws java.rmi.RemoteException,
FaultException
category - category array of Alertsjava.rmi.RemoteException - if request fails in remote machineFaultException - if there are any exceptions while fetching
alerts count for given categoriesgetTotalAlertCount(),
getTotalAlertCount(String category)
public int getAlertCount(java.lang.String[] category,
int severity)
throws java.rmi.RemoteException,
FaultException
category - category of the Alertsseverity - The severity value of the alert as specified in the
SeverityInfo.conf file in the WebNMS/conf directory..java.rmi.RemoteException - if request fails in remote machinegetTotalAlertCount(String category),
getAlertCount(String category,int severity)
public Alert checkOutIfAvailable(java.lang.String entity)
throws java.rmi.RemoteException,
TimeoutException,
FaultException
entity - The unique name of the Alert to be checked outjava.rmi.RemoteException - if a problem occurs when accessing through RMI.TimeoutException - if the object is locked by some other threadFaultException - if there is any exception while checking the
object statuscheckOut(String entity,int timeOut)
public Alert checkOut(java.lang.String entity,
int timeOut)
throws java.rmi.RemoteException,
TimeoutException,
FaultException
entity - The unique name of the Alert to be checked outtimeOut - Time in seconds to wait, if the object is locked by some other thread.TimeoutException - if the object is not available for writing
for the specified amount of time.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while checking the object
statuscheckOutIfAvailable(String entity)
public void unlock(Alert obj)
throws java.rmi.RemoteException,
FaultException
obj - The Alert Object that is to be unlocked.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while unlocking the objectLockableObject,
lock(Alert alt,int lock_type,int timeOut)
public boolean checkWritePermission(Alert obj)
throws java.rmi.RemoteException,
FaultException
obj - The AlertObject instance that is to be checked whether it has
a write lock.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while checking the write permissionLockableObject
public int getCurrentLockType(Alert obj)
throws java.rmi.RemoteException,
FaultException
obj - AlertObject instance for which the lock type is to be
obtained.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while getting the current lock type.lock(Alert alt,int lock_type,int timeOut)
public void clearLockForObject(java.lang.String entity,
int lockType)
throws java.rmi.RemoteException,
FaultException
entity - Name of the AlertObject to be unlocked.lockType - Type of the lock to be unlocked.java.rmi.RemoteException - if request fails in remote machineFaultException - if there is any exception while releasing the specific lock typeunlock(Alert alt)
public Alert lock(Alert obj,
int lock_type,
int timeout)
throws java.rmi.RemoteException,
TimeoutException
lock_type - Type of the lock to be locked. One of the constants
present in LockableObject interface.obj - AlertObject instance which is to be lockedtimeout - Time in seconds to wait.java.rmi.RemoteException - if request fails in remote machineTimeoutException - if the Alert object is already locked and not available
with in the spcified time interval,unlock(Alert alt)
public void setAlertModuleParams(java.util.Properties prop)
throws java.rmi.RemoteException,
com.adventnet.nms.admin.InvalidParameterException
| Alert Module Parameters | Values Allowed |
| ALERT_DELETE_INTERVAL | int > 0 (numhours) |
| ALERT_TO_MANAGEDOBJECT_PROPOGATION | max,latest,none |
| ALERTS_USER_PROPERTY | latest,append,none |
| CREATE_ALERT_HISTORY | true,false |
| ON_DELETING_ALERT_DELETE | none,both,history,annotation |
| ACTION_ON_DELETING_MO | clear,delete,none |
| ANNOTATION_TABLE_SIZE | int >= 0 |
| ALERT_LOCK | true,false |
| MAX_ALERTS_PER_BATCH | int >= 0 |
prop - java.util.Properties object in which Alert Module Parameters and their
values are storedjava.rmi.RemoteException - if request fails in remote machinecom.adventnet.nms.admin.InvalidParameterException - if invalid value is given
for any of the Alert Module Parameter.
public java.util.Properties getAlertModuleParams()
throws java.rmi.RemoteException
The following parameters and their values will be put in the java.util.Properties object and returned.
| Alert Module Parameters | Possible Values |
| ALERT_DELETE_INTERVAL | int > 0 (numhours) |
| ALERT_TO_MANAGEDOBJECT_PROPOGATION | max,latest,none |
| ALERTS_USER_PROPERTY | latest,append,none |
| CREATE_ALERT_HISTORY | true,false |
| ON_DELETING_ALERT_DELETE | none,both,history,annotation |
| ACTION_ON_DELETING_MO | clear,delete,none |
| ANNOTATION_TABLE_SIZE | int >= 0 |
| ALERT_LOCK | true,false |
| ALERT_WINDOW_SIZE | int > 0 |
| GROUP_ALERTS_MODE | max,latest,none |
| MAX_ALERTS_PER_BATCH | int >= 0 |
java.rmi.RemoteException - if request fails in remote machine
public void resumeFilterAction(java.lang.String[] runnableClassName)
throws java.rmi.RemoteException
runnableClassName - The classname with the package structure of the runnable class to be resumed.java.rmi.RemoteException - if a problem occurs when accessing through RMI.
For eg,
runnableClassName[0]="com.adventnet.nms.alertdb.SendEmailAlertAction"
runnableClassName[1]="com.adventnet.nms.alertdb.SendTrapAlertAction"
Note: The "FILTERACTION_FOR_ALERT_IN_THREAD" argument in EventMgr process must be set to true in NmsProcessBE.conf file to use this method.
public void pauseFilterAction(java.lang.String[] runnableClassName)
throws java.rmi.RemoteException
runnableClassName - The classname with the package structure of the runnable class to be resumed.java.rmi.RemoteException - if a problem occurs when accessing through RMI.
For eg,
runnableClassName[0]="com.adventnet.nms.alertdb.SendEmailAlertAction"
runnableClassName[1]="com.adventnet.nms.alertdb.SendTrapAlertAction"
Note: The "FILTERACTION_FOR_ALERT_IN_THREAD" argument in EventMgr process must be set to true in NmsProcessBE.conf file to use this method.
|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||