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

	"@(#)README 3.3 99/03/23 SMI"

	Copyright (c) 03/23/99, by Sun Microsystems, Inc.
	All rights reserved.

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

			Simple Event Example
			====================


-----------------------------------------------------------------------
1. Example overview
-----------------------------------------------------------------------
This example shows how to implement a simple event listener.

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 and registers a listener for receiving events 
	  emitted by an event source.
	- Gets and sets the State m-bean property through a c-bean by
	  using a handle on the m-bean. Changes to the State property 
	  trigger the emission of an event.

   * ClientListener.java:
	- Implements the SimpleListener event listener interface for
	  receiving events of type SimpleEvent emitted by the
	  Simple m-bean.

   * Simple.java:
	- Implements a simple m-bean.
	- Implements events by providing methods for adding and 
	  removing event listeners.
	- Emits events of type SimpleEvent to registered event
	  listeners.
	- Contains a read-write m-bean property and a read-only 
	  m-bean property.

   * SimpleEvent.java:
	- Implements a simple event to be emitted by an event
	  source.

   * SimpleListener.java:
	- Defines a simple event listener interface for receiving
	  events of type SimpleEvent.


-----------------------------------------------------------------------
2. Building and running the example
-----------------------------------------------------------------------
To build the simple event example, copy the example source files to your 
working directory and type the following commands:

   cd <WORKING_DIR>

   javac -d . Simple.java

   mogen Simple

   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 Client

