Example name : ObserverExample.java
Location : <Web NMS Home>/examples/Security/authorization directory
This example explains the security observer concept. Here the actions specified in the update() method in the AuthObserverImpl (located in <Web NMS Home>/examples//Security/authorization directory) will be performed. When the user executes this example class, the updates on the security operations will be notified to the user.
One can register for three kinds of updates in security observer. The observer class can register itself for any of the following :
Prior to executing this example class it is imperative of the user to write the update() method implementing the AuthObserverImpl class. This method will have all the actions that are to be performed on receipt of an update. The action may be a simple Print command which prints details of the update in the console or into a file. For more information on writing the Update class please refer to the documentation on Observers under Authorization section in Security management.
The interface used in this example is AuthObserver
Methods used in this example are listed below. These methods will return a boolean "true" if the observer is registered for any of these updates.
Note : The source code will have comment statements in it which will explain to you the different segments of the program.
The steps given below will help you in integrating this example with Web NMS. If any of the steps given below are not followed properly, then the example might not function in a desired manner.
(1) java com.adventnet.nms.example.security.authorization.ObserverExample ALL
(2) java com.adventnet.nms.example.security.authorization.ObserverExample USER
(3) java com.adventnet.nms.example.security.authorization.ObserverExample OPERATION
After you have tried this example, to remove its association with Web NMS, you must remove the class file ObserverExample.class from <Web NMS Home>/classes/com/adventnet/nms/example/security/authorization directory.
Copyright © 1996-2002, AdventNet Inc. All Rights Reserved.