4.1

Table Of Contents
For a description of the role of the plug-in events 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 event publisher
interface, see “IPluginEventPublisher Interface,” on page 211.
Procedure
1 Set Up the Event Generator on page 167
You can create IPluginEventPublisher instances and methods to generate events directly in the plug-in
adaptor implementation. However, the solar system class creates these objects in a separate class.
2 Create Event Publishers on page 168
You can create IPluginEventPublisher instances to publish event gauges and event triggers to the
Orchestrator policy engine. Policies run in the Orchestrator server and monitor objects through plug-ins.
3 Define and Publish Events to Orchestrator on page 169
The IPluginEventPublisher interface allows you to publish to the Orchestrator policy engine events that
you define in the plug-in that occur in the plugged-in technology.
Set Up the Event Generator
You can create IPluginEventPublisher instances and methods to generate events directly in the plug-in adaptor
implementation. However, the solar system class creates these objects in a separate class.
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 event generator class named
YourApplicationName
EventGenerator.java.
In the solar system example, the event generator class is named SolarSystemEventGenerator.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 any other classes that the event generator requires.
In the solar system example, the event generator requires the following classes:
import java.util.*;
import org.apache.log4j.Logger;
5 Declare a public class for the event generator implementation.
The solar system example factory declares the SolarSystemEventGenerator class.
public class SolarSystemEventGenerator {
}
Chapter 7 Developing Plug-Ins
VMware, Inc. 167