Solaris WBEM Developer's Guide

ProcedureHow To Generate an Event Indication

Steps
  1. Implement the EventProvider interface.

    For example:

    public class sampleEventProvider 
    implements InstanceProvider EventProvider{
    
        // Reference for provider to contact the CIM Object Manager
        private ProviderCIMOMHandle cimom;
       }
  2. Execute each of the methods listed in Table 6–2 for each instance indication that the provider handles.

  3. Create an indication for create, modify, and delete instance event type.

    For example, in the createInstance method:

    public CIMObjectPath createInstance(CIMObjectPath op, 
            CIMInstance ci)
        throws CIMException {
            CIMObjectpath newop = ip.createInstance(op, ci);
           
            CIMInstance indication = new CIMInstance();
            indication.setClassName("CIM_InstCreation");
            
            CIMProperty cp = new CIMProperty();
            cp.setName("SourceInstance");
            cp.setValue(new CIMValue(ci));
            
            Vector v = new Vector();
            v.addElement(cp);
            indication.setProperties(v);
            ...
        }
  4. Deliver the event indication to the CIM Object Manager.

    cimom.deliverEvent(op.getNameSpace(), indication);