Sun WBEM SDK Developer's Guide

Adding a CIM Listener

A client application must add the CIMListener interface to register for indications of CIM events. The CIM Object Manager generates indications for CIM events that are specified by the event filter when a client subscription is created.

The CIMListener interface must implement the indicationOccured method which takes the argument, CIMEvent, the CIM event returned by the CIMListener.


Example 6–1 Adding a CIM Listener

// Connect to the CIM Object Manager
cc = new CIMClient();

// Register the CIM Listener
cc.addCIMListener(
new CIMListener() {
    public void indicationOccured(CIMEvent e) {
    }
});