4.0

Table Of Contents
Add Plug-In Watchers
Plug-in watchers monitor the events that workflow triggers define. When an event occurs, Orchestrator notifies
any workflows that are waiting for that event.
Prerequisites
n
Create a public constructor that implements the IPluginAdaptor interface.
n
Instantiate the plug-in factory.
n
Create event generators and publishers.
Procedure
1 Create an instance of the plug-in watcher implementation.
The SolarSystemAdapter class creates an instance of the SolarSystemWatchersManager class.
private static final SolarSystemWatchersManager watchersManager =
new SolarSystemWatchersManager();
2 Add a watcher instance to the plug-in adaptor.
You add a watcher to the adapter by calling the IPluginAdaptor.addWatcher() method.
The solar system example defines a method to add the SolarSystemWatchersManager instance.
public void addWatcher(PluginWatcher watcher) {
log.info( "Adding watcher '" + watcher + "'" );
watchersManager.addWatcher(watcher);
}
3 Remove a watcher from the plug-in adaptor.
You remove a watcher by calling the IPluginAdaptor.removeWatcher() method.
The solar system example defines a method to remove a SolarSystemWatchersManager instance.
public void removeWatcher(String watcherId) {
log.info( "Removing watcher '" + watcherId + "'" );
watchersManager.removeWatcher( watcherId );
}
4 Instantiate the plug-in publisher that publishes events from the watchers to the Orchestrator notification
mechanism.
The solar system example defines a method that calls the
SolarSystemWatchersManager.setPluginPublisher() method to instantiate a plug-in publisher.
public void setPluginPublisher(IPluginPublisher pluginPublisher) {
watchersManager.setPluginPublisher( pluginPublisher );
}
You added watchers to the plug-in adapter implementation to monitor the events that workflow triggers
generate.
What to do next
Add a tab for the plug-in to the Orchestrator configuration interface.
vCenter Orchestrator Developer's Guide
190 VMware, Inc.