4.1

Table Of Contents
Set Up the Plug-In Factory Implementation
To create a plug-in factory, you create an implementation of the IPluginFactory interface from the Orchestrator
plug-in API.
Prerequisites
n
You have an application to plug in to Orchestrator.
n
You have access to the Orchestrator plug-in API JAR file.
Procedure
1 Create and save a Java file for the plug-in factory implementation named
YourApplicationName
Factory.java.
In the solar system example, the factory class is named SolarSystemFactory.java.
2 Declare the package that contains the Java classes of the plug-in implementation.
The solar system example declares the following package:
package com.vmware.orchestrator.api.sample.solarsystem;
3 Import the Orchestrator plug-in API classes with a Java import statement.
import ch.dunes.vso.sdk.api.*;
4 Import the classes of the application to plug in with a Java import statement.
import com.vmware.solarsystem.*;
5 Import any other classes that the factory implementation requires.
In the solar system example, the factory implementation requires the following classes:
import java.util.*;
import org.apache.log4j.Logger;
6 Declare a public class that implements the IPluginFactory interface from the Orchestrator plug-in API.
The solar system example factory declares the SolarSystemFactory class.
public class SolarSystemFactory implements IPluginFactory {
}
You set up the IPluginFactory implementation.
What to do next
Set up event listeners and notifications in the plug-in factory.
Set Up Event Listeners and Notification Handlers
You activate event listeners and notification handlers for a plug-in in the factory implementation.
The plug-in adapter creates one plug-in factory for each connection between Orchestrator and the plugged-in
technology. Consequently, you set up event listeners and notification handlers in the plug-in factory to listen
for events through the connection and to send notifications about the events that the listeners discover.
Prerequisites
n
Set up the factory implementation class.
n
Declare a public class that implements the IPluginFactory interface.
Chapter 7 Developing Plug-Ins
VMware, Inc. 157