//
//  Create subscription to receive indications of the RT_TestIndication
//  class and have them sent to the SimpleDisplayConsumer
//  The SimpleDisplayConsumer logs received indications to the 
//  indicationLog file
//
void _subscribe
    (CIMClient & client)
{
    //
    //  Create filter
    //
    CIMObjectPath filterPath = _createFilter 
       (client, 
        "TestFilter",
        "SELECT MethodName FROM RT_TestIndication",
        "WQL",
         SOURCENAMESPACE.getString ());

    //
    //  Create handler
    //
    CIMObjectPath handlerPath = _createHandler 
       (client,
        "TestHandler",
        "localhost/CIMListener/Pegasus_SimpleDisplayConsumer");

    //
    //  Create subscription to receive indications of the RT_TestIndication
    //  class and have them sent to the SimpleDisplayConsumer
    //  The SimpleDisplayConsumer logs received indications to the 
    //  indicationLog file
    //
    CIMObjectPath subscriptionPath = _createSubscription 
       (client,
        filterPath, 
        handlerPath);
}
Example #2
0
void _setup(CIMClient& client)
{
    _createFilterInstance(client, String("DRFilter01"),
        String("SELECT * FROM DeliveryRetryTestClass"), "WQL");

    char hName[256];

    for (Uint32 i = 1; i <= HANDLER_COUNT ; ++i)
    {
        sprintf(hName,"DRHandler%i",i);
        _createHandlerInstance(client, hName,
            String ("http://localhost:2003/CIMListener/DeliveryRetryListener"));
        _createSubscription(client, "DRFilter01", hName);
    }
}