4.0

Table Of Contents
Notify Orchestrator of Events in the Plugged-In Technology
Event listeners implement the IPluginNotificationHandler interface from the Orchestrator plug-in API to
notify Orchestrator of events in the plugged-in technology.
The IPluginNotificationHandler interface defines methods that you implement in the event listener to notify
Orchestrator of changes in state of the objects that the event listener monitors in the plugged-in technology.
The SolarSystemEventListener class monitors objects in a SolarSystemRepository instance for changes in state
that the following methods cause:
n
Planet.setCircumference(), that changes the circumference of a planet.
n
Planet.setGravity(), that changes the gravity of a planet.
n
Star.addPlanet(), that adds a planet to a star.
n
Star.removePlanet(), that removes a planet from a star.
The events that the SolarSystemEventListener class monitors are all events that the solar system application
defines.
Prerequisites
n
Set up the event listener implementation class.
n
Declare a public class that implements the java.util.EventListener interface.
n
Create an instance of the IPluginNotificationHandler interface.
n
Register the event listener and the notification handler instances with the plugged-in technology.
Chapter 7 Developing Plug-Ins
VMware, Inc. 169