-----------------------------------------------------------------------

	"@(#)README 3.1 98/09/29 SMI"

	Copyright (c) 09/29/98, by Sun Microsystems, Inc.
	All rights reserved.

-----------------------------------------------------------------------

		Alarm Clock and Difference Monitor Example
		==========================================


-----------------------------------------------------------------------
1. Example overview
-----------------------------------------------------------------------
The current directory contains the following source files:
   * Client.java:
	- Implements a simple manager.	
	- Sets up communication using the RMI adaptor client
	  to connect to the agent.
	- Gets a handle on an m-bean from the remote agent.
	- Instantiates, registers and configures a gauge monitor in the 
	  remote agent. This gauge monitor monitors differences in the  
	  value of the Temp property in the Weather m-bean. It emits a 
	  monitor event if the difference between the current value of the
	  Temp property and the previous one is below the low threshold or
	  above the high threshold.
	- Instantiates and registers a listener for receiving monitor events. 

   * ClientListener.java:
	- Implements the MonitorListenerMO event listener interface for
	  receiving events of type MonitorEventMO emitted by monitors.

   * Weather.java:
	- Implements a simple m-bean.
        - Uses the m-bean specific method initCmf to register an m-bean
	  with the framework and add the m-bean as a listener
	  for receiving events emitted by an alarm clock.
	  The method also sets the timeout for the alarm clock and
	  starts it.
        - Uses the m-bean specific method deleteCmf to stop the alarm
	  clock and remove the m-bean as a listener before the m-bean is 
	  deleted.
	- Contains a read-only m-bean property.


-----------------------------------------------------------------------
2. Running the precompiled version
-----------------------------------------------------------------------
To run the precompiled version of the example, type the following 
commands:

   setenv CLASSPATH /opt/SUNWconn/jaw/examples/classes:/opt/SUNWconn/jaw/classes/jawco.jar:/opt/SUNWconn/jaw/classes/jawag.jar:/opt/SUNWconn/jaw/classes/jawcl.jar:/opt/SUNWconn/jaw/classes/jawcs.jar:/opt/SUNWconn/jaw/classes/jawtk.jar

   # Make sure that no agents are already running 
   # and start the Java DMK base agent:

   jaw start

   # Start the manager:

   java examples.mo.Monitor2.Client


-----------------------------------------------------------------------
3. Building and running your own version
-----------------------------------------------------------------------
To build your own version of the example, copy the example source files 
to your working directory and type the following commands:

   cd <WORKING_DIR>

   setenv CLASSPATH .:/opt/SUNWconn/jaw/examples/classes:/opt/SUNWconn/jaw/classes/jawco.jar:/opt/SUNWconn/jaw/classes/jawag.jar:/opt/SUNWconn/jaw/classes/jawcl.jar:/opt/SUNWconn/jaw/classes/jawcs.jar:/opt/SUNWconn/jaw/classes/jawtk.jar

   javac -d . Weather.java

   mogen examples.mo.Monitor2.Weather

   javac -d . *.java


To run the version of the example you have just built,
type the following commands:

   # Make sure that no agents are already running 
   # and start the Java DMK base agent:

   jaw start

   # Start the manager:

   java examples.mo.Monitor2.Client

