|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.nms.topodb.TopoNotificationEvent
public class TopoNotificationEvent
This Event is used to propagate the data to the topo action listeners. This will contain the details that has been received from the Topology module about the notification. This event is then propagated to all the action listeners who have registered themselves for responses for any change in the Topology Database. These action listeners should either implement the TopoActionListener interface or extend the AbstractTopoActionListener class.
| Constructor Summary | |
|---|---|
TopoNotificationEvent(java.lang.String type,
java.util.Vector objects)
Constructs a TopoNotificationEvent. |
|
| Method Summary | |
|---|---|
java.util.Vector |
getModifiedPropertyKeys()
Returns the Vector of keys that were modified on updating the ManagedObject. |
ManagedObject |
getNewManagedObject()
Returns the ManagedObject instance that was added or modified, causing this nofitication. |
ManagedObject |
getOldManagedObject()
Returns the ManagedObject instance that was before the database change, causing this nofitication. |
java.lang.String |
getUpdateType()
Returns the type of the database change occurred. |
java.lang.String |
toString()
Returns a string representation of this Event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TopoNotificationEvent(java.lang.String type,
java.util.Vector objects)
type - - Type of the database change ocurred.objects - - a vector containing both the new ManagedObject and the
old ManagedObject| Method Detail |
|---|
public java.lang.String getUpdateType()
type Details"Added" Implies that a new ManagedObject has been added to the Topology Database.
"Deleted" Implies that a ManagedObject has been deleted from the database.
"Manage Update" Impiles that the managed property of the ManagedObject has changed from its previous value. This happens when a managed object is managed / unmanaged using API methods or from the client or when its status changes to unknown.
"Status Update" Impiles that the status property of the ManagedObject has been modified. This occurs during the status polling, rediscovery or when status is updated explicitly (using the API methods or from client).
"StatusPollEnabled Update" Impiles that the statusPollEnabled property of the ManagedObject has changed from its previous value.
"Discover Update" Impiles that the discover property of the Network Object has changed from its previous value. This property is modified when the network is managed from unmanaged state and also using the API methods.
"Property Update" Implies that some other property (including user properties) of the ManagedObject, other than managed, status, discover and statusPollEnabled properties, has changed.
"IpAddress Update" Implies that the ipAddress property of the Managed Object has changed.
"License Limit Exceeded" Implies that the number of the ManagedObjects/Devices has exceeded the limit specified in the License file and hence will not be added to the database.Information regarding the type of license (Whether MO_based or Device_based) is set as a property named "license_type" and information on license limit is set as a property named "license_limit" for the ManagedObject for which the notification is received. e.g.: Let the Applied license have a limit of 200 Managed Objects.After adding 200 ManagedObject to the database,if some more ManagedObject is being added then the Listener will get notified and those ManagedObjects will not get added to the Database. In the update(TopoNotificationEvent evt) method evt.getUpdateType() will return the string License Limit Exceed . The information regarding the license type and limit can be got as follows inside the update() method
//code snippet ManagedObject obj=evt.getNewManagedObject(); Properties prop=obj.getProperties(); //The below line returns the String "MO_based" String licenseType=prop.getProperty("license_type"); //The below line returns the String "200" String licenseLimit=prop.getProperty("license_limit");
public ManagedObject getOldManagedObject()
getModifiedPropertyKeys().
On receiving the type as "Added" this method will return null, since
there exists no ManagedObject on this name before the operation.
public ManagedObject getNewManagedObject()
getModifiedPropertyKeys().
On receiving the type as "Deleted" this method will return null, since
there exists no ManagedObject with this name after the operation.
public java.util.Vector getModifiedPropertyKeys()
public java.lang.String toString()
toString in class java.lang.Object
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||