Solaris WBEM SDK Developer's Guide

Creating an Event Handler

An event handler is an instance of a CIM_IndicationHandler class. You set the properties in an instance of the CIM_IndicationHandler class to uniquely name the handler and identify the UID of its owner. The CIM Event MOF defines a CIM_IndicationHandlerCIMXML class for describing the destination for indications to be delivered to client applications using the HTTP protocol. The Solaris Event MOF extends the CIM_IndicationHandler class by creating the Solaris_JAVAXRMIDelivery class to handle delivery of indications of CIM events to client applications using the RMI protocol. RMI clients must instantiate the Solaris_JAVAXRMIDelivery class to set up an RMI delivery location.

Table 3-7 CIM_IndicationHandler Properties

Property 

Description 

Required/Optional 

SystemCreationClassName 

The name of the system on which the creation class for the handler resides or to which it applies. 

 Optional. Completed by the CIM Object Manager.

SystemName 

The name of the system on which the handler resides or to which it applies. 

Optional. The default value for this key property is the name of the system on which the CIM Object Manager is running. 

CreationClassName 

The class or subclass used to create the handler. 

Optional. The CIM Object Manager assigns the appropriate class name as the default for this key property. 

Name 

The unique name of the handler. 

Optional. The client application must assign a unique name. 

Owner 

The name of the entity that created or maintains this handler. The provider can check this value to determine whether or not to authorize a handler to receive an indication. 

Optional. The default value is the Solaris user name of the user creating the instance. 


Example 3-23 Creating an Event Handler

// Create an instance of the Solaris_JAVAXRMIDelivery class or get
// the appropriate instance of the handler.
CIMInstance ci = cc.getIndicationHandler(null);

//Create a new instance (delivery) from
//the rmidelivery instance.
CIMObjectPath delivery = cc.createInstance(new CIMObjectPath(), ci);