Java Dynamic Management Kit 4.2 Tutorial

Running the Inform Request Example

The examplesDir/Snmp/Inform directory contains all of the files for the two manager applications, along with the InformListenerImpl class.

Compile all files in this directory with the javac command. For example, on the Solaris platform with the Korn shell, you would type:


$ cd examplesDir/Snmp/Inform/
$ javac -classpath classpath *.java

To run the example, launch the inform request receiver with the following command. You may launch the application in another terminal window or on another machine.


$ java -classpath classpath SimpleManager2

Wait for this manager to be initialized, then launch the other manager with the following command. The hostname is the name of the machine where you launched the receiving manager, or localhost.


$ java -classpath classpath SimpleManager1 hostname

When the sender is ready, press <Enter> to send the inform request. You should see the contents of the request displayed by the receiving manager. Immediately afterwords, the sender receives the inform response containing the same variable bindings and displays them. Both manager applications then exit automatically.