4.1

Table Of Contents
Procedure
1 Create methods that implement the IPluginNotificationHandler.notifyElementUpdated() method to
notify Orchestrator of changes to an existing object.
The SolarSystemEventListener class creates the following methods to inform Orchestrator of changes to
the circumference and gravity of a particular Planet object:
public void circumferenceChanged(Planet planet) {
notificationHandler.notifyElementUpdated("Planet", planet.getId());
}
public void gravityChanged(Planet planet) {
notificationHandler.notifyElementUpdated("Planet", planet.getId());
}
2 Create methods that implement the IPluginNotificationHandler.notifyElementInvalidate() method to
notify Orchestrator of changes in relations between objects.
The SolarSystemEventListener class creates the following method to notify Orchestrator that a child
Planet object is added to a parent Star object.
public void planetAdded(Planet planet) {
notificationHandler.notifyElementInvalidate("Star", "sol");
}
3 Create methods that implement the IPluginNotificationHandler.notifyElementDeleted() method to
notify Orchestrator of the removal of an object.
The SolarSystemEventListener class creates the following method to notify Orchestrator that a child
Planet object is deleted from its parent Star.
public void planetRemoved(Planet planet) {
notificationHandler.notifyElementDeleted("Planet", planet.getId());
}
You implemented the methods of the IPluginNotificationHandler interface to notify Orchestrator of events
that occur on the objects in the plugged-in technology.
What to do next
Create an event generator to push to the plugged-in technology events that the Orchestrator plug-in defines.
Create a Plug-In Event Generator
You can create one or more event generators in a plug-in to perform operations on the objects in the plugged-
in technology. The event generator generates events that the Orchestrator plug-in, rather than the plugged-in
technology, defines.
You can implement the IPluginEventPublisher interface to publish events in the plugged-in technology to the
Orchestrator policy engine. You create methods to set policy triggers and gauges on objects in the plugged-in
technology and event listeners to listen for events on those objects.
The solar system plug-in features an event generator that implements an event publisher and creates a method
to generate solar flares on a Star object in a SolarSystemRepository instance. These procedures present the
steps involved in creating a plug-in event generator. To illustrate the process, they present code from the
SolarSystemEventGenerator class. The package of workflows, actions, and resources that accompany the solar
system example contains a policy template that monitors a gauge that the SolarSystemEventGenerator class
publishes to the policy engine.
You can download the Orchestrator examples ZIP file from the Orchestrator documentation home page to
obtain the sources of the solar system example application and plug-in.
vCenter Orchestrator Developer's Guide
166 VMware, Inc.