4.1

Table Of Contents
3 Import the Orchestrator plug-in API interfaces, classes, and enumerations with a Java import statement.
import ch.dunes.vso.sdk.api.*;
4 Import any other classes that the adapter implementation requires.
In the solar system example, the adapter implementation requires the following classes:
import javax.security.auth.login.LoginException;
import org.jboss.logging.Logger;
5 Declare a public constructor that implements the IPluginAdaptor interface from the Orchestrator plug-in
API.
The solar system adapter declares the SolarSystemAdapter constructor.
public class SolarSystemAdapter implements IPluginAdaptor {
}
6 Set up a logger to write to the logs the events that occur in the adapter.
The solar system adapter uses an instance of org.jboss.logging.Logger to log events.
private static final Logger log = Logger.getLogger(SolarSystemAdapter.class);
You set up the IPluginAdaptor implementation.
What to do next
Create an instance of the IPluginFactory implementation.
Instantiate the Plug-In Factory
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.
Prerequisites
n
Create an implementation of the IPluginFactory interface.
n
Set up the adapter implementation class.
n
Create a public constructor that implements the IPluginAdaptor interface.
Procedure
1 Declare the variables that the adapter class uses in its method calls.
The solar system adapter declares variables for the plug-in factory and plug-in name.
public class SolarSystemAdapter implements IPluginAdaptor {
private SolarSystemFactory factory;
static String pluginName;
}
2 Create an instance of the plug-in factory class that implements the IPluginFactory interface.
The solar system adapter calls the IPluginAdaptor.createPluginFactory() method to create an instance
of the SolarSystemFactory interface, if one does not exist already.
public IPluginFactory createPluginFactory(String sessionID, String username,
String password, IPluginNotificationHandler notificationHandler)
throws SecurityException, LoginException, PluginLicenseException {
if (factory == null) {
vCenter Orchestrator Developer's Guide
182 VMware, Inc.