|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TopoSubscriber
This is the interface that needs to be implemented for getting notifications of
add, delete, update of related objects in the Topology Database. The relation
being referred to here, is the containment relationship or parent-child
relationship. To listen for notifications about the container object and its
children, users should implement this interface and register the container object
with the Topology module using the TopoAPI.registerTopoSubscriber(TopoSubscriber, String)
method. Hence, by implementing TopoSubscriber, notifications for parent and its
children can only be obtained unlike TopoObserver where notifications for
all objects in the Topology DataBase can be obtained.
If you no longer want to receive notification about the changes in
the Topology DataBase, you can deregister from getting notifications using
TopoAPI.deregisterTopoSubscriber(TopoSubscriber) method. The class
implementing the interface can listen for notifications through RMI too.
To use RMI, get the TopoAPI reference through RMI and register with the TopoDB. The Object registering also has to export itself by invoking the java.rmi.server.UnicastRemoteObject.exportObject(); if it is not an instance of a class that extends UnicastRemoteObject.
DefaultTopoSubscriber,
com.adventnet.nms.topodb.TopoObserver,
TopoNotificationRegistry| Method Summary | |
|---|---|
void |
initialize(NmsTreeNode rootNode)
Deprecated. From Web NMS 5 |
void |
update(java.lang.String type,
ManagedObject obj,
java.lang.String[] path)
This method is invoked when a notification is sent from the TopoDB. |
| Method Detail |
|---|
void initialize(NmsTreeNode rootNode)
throws java.rmi.RemoteException
rootNode - This root node contains all the child nodes in the form of
tree with the parent-children relationship. This method
fetches all the children objects of the registered object
( including children of the registered object's children,
if any and so on ) recursively, and forms a tree node with
the parent-children relationship.
java.rmi.RemoteException - in case of error.NmsTreeNode
void update(java.lang.String type,
ManagedObject obj,
java.lang.String[] path)
throws java.rmi.RemoteException
type - The type argument is same as the type argument in
the method update() of class TopoObserver.
Please refer to TopoObserver#update(String,ManagedObject)obj - The object which received the update.path - The path of the object which gets update. The path contains the
parent object names from the root object including the object name
which gets update. The first element of the array being the
registered Container Object name and the last element being the
name of object which gets update.
java.rmi.RemoteException - in case of error.
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||