4.0

Table Of Contents
The possible return values of the hasChildrenInRelation() method are Yes, No, and Unknown. If you do not
implement the hasChildrenInRelation() method, it returns Unknown.
Prerequisites
n
Set up the factory implementation class.
n
Create a public constructor that implements the IPluginFactory interface.
Procedure
u
Declare the IPluginFactory.hasChildrenInRelation() method to discover whether an object has any
children of a certain relation type.
The SolarSystemFactory example does not fully implement the hasChildrenInRelation() method and
returns unknown in all cases.
public HasChildrenResult hasChildrenInRelation(String parentType,
String parentId, String relationName) {
return HasChildrenResult.Unknown;
}
You called the IPluginFactory.hasChildrenInRelation() method to discover whether an object has any
children of a certain relation type.
What to do next
Create an event listener object to allow Orchestrator to monitor events in the plugged-in technology.
Create a Plug-In Event Listener
Plug-in event listeners allow Orchestrator to monitor events that occur in the plugged-in technology. To create
a plug-in event listener, you create a Java class that implements the IPluginNotificationHandler interface from
the Orchestrator plug-in API.
These procedures present the steps involved in creating a plug-in event listener. To illustrate the process, they
present code from the SolarSystemEventListener 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 and plug-in.
For a description of the role of plug-in event listeners and the other components of a plug-in, see “Overview
of Plug-Ins,” on page 141. For information about all the methods and parameters of the
IPluginNotificationHandler interface, see “IPluginNotificationHandler Interface,” on page 220.
Procedure
1 Set Up the Event Listener Implementation on page 167
To create a plug-in event listener, you implement the java.util.Eventlistener interface and create an
instance of the IPluginNotification interface from the Orchestrator plug-in API.
2 Register the Event Listener with the Plugged-In Technology on page 168
To monitor events in a plugged-in technology, you must register the event listener from the plug-in with
the plugged-in technology and implement a notification handler.
3 Notify Orchestrator of Events in the Plugged-In Technology on page 169
Event listeners implement the IPluginNotificationHandler interface from the Orchestrator plug-in API
to notify Orchestrator of events in the plugged-in technology.
vCenter Orchestrator Developer's Guide
166 VMware, Inc.