4.1

Table Of Contents
You created an instance of a class that the vso.xml file can map to a scripting class in the Orchestrator JavaScript
API. The vso.xml file of the solar system example maps the _solarSystemEventGenerator instance to the
SolarSystemEventGenerator scripting class in the JavaScript API.
What to do next
Implement the plug-in adapter to instantiate all of the classes and objects that you defined in the plug-in.
Create a Plug-In Adapter
To create a plug-in adapter, you create a Java class that implements the IPluginAdaptor interface from the
Orchestrator plug-in API. The adapter instantiates the plug-in factory and event management
implementations.
These procedures present the steps involved in creating a plug-in adapter. To illustrate the process, they present
code from the SolarSystemAdapter class from the solar system example application. You can download the
Orchestrator examples ZIP file from the Orchestrator documentation home page to obtain the sources of the
solar system example application.
For a description of the role of the plug-in adapter and the other components of a plug-in, see “Overview of
Plug-Ins,” on page 139. For information about all of the methods and parameters of the adapter interface, see
“IPluginAdaptor Interface,” on page 210.
Procedure
1 Set Up the Plug-In Adapter Implementation on page 181
To create a plug-in adapter, you create an implementation of the IPluginAdaptor interface from the
Orchestrator plug-in API.
2 Instantiate the Plug-In Factory on page 182
You instantiate the plug-in factory in the plug-in adapter. The adapter creates one factory instance for
every connection between Orchestrator and the plugged-in technology.
3 Manage Plug-In Events on page 183
The plug-in adapter manages the events that occur in the plugged-in technology by defining event
generators and event publishers.
4 Add Plug-In Watchers on page 184
Plug-in watchers monitor the events that workflow triggers define. When an event occurs, Orchestrator
notifies any workflows that are waiting for that event.
Set Up the Plug-In Adapter Implementation
To create a plug-in adapter, you create an implementation of the IPluginAdaptor interface from the
Orchestrator plug-in API.
Procedure
1 Create and save a Java file for the plug-in adapter implementation named
YourApplicationName
Adapter.java.
In the solar system example, the adapter class is SolarSystemAdapter.java.
2 Declare a package to contain the plug-in implementation.
The solar system example declares the following package to contain the adapter, factory, and event handler
implementations:
package com.vmware.orchestrator.api.sample.solarsystem;
Chapter 7 Developing Plug-Ins
VMware, Inc. 181