javax.wbem.provider
Interface CIMIndicationProvider

All Superinterfaces:
CIMProvider

public interface CIMIndicationProvider
extends CIMProvider

This is the interface implemented by indication providers. If the interface is not implemented, the CIM Object manager (CIMOM) may poll its instances for life cycle indications (CIM_InstCreation, CIM_InstDeletion, etc).

Filters may be broken down by the CIMOM into sub filters. Using sub filters, providers can process indications without knowing about the class hierarchy. The sub filter information is passed in as three arrays:

 String[] subFilters;
 CIMObjectPath[] classPath;
 String[] eventType;
 
The following example illustrates the array contents where the class hierarchy in root/cimv2 is:
 test_a
 test_b : test_a
 test_c : test_a
 test_d : test_a
 
If Provider P is the provider for test_b and test_c and the filter is 'select * from CIM_InstIndication where sourceInstance ISA test_a and sourceInstance.prop1 = 20', then P gets the following subfilter information:
 subFilters[0] = "select * from CIM_InstCreation where sourceInstance.prop1=20"
 subFilters[1] = "select * from CIM_Deletion where sourceInstance.prop1=20"
 subFilters[2] = "select * from CIM_Modification where sourceInstance.prop1=20"
 subFilters[3] = "select * from CIM_Read where sourceInstance.prop1=20"
 subFilters[4] = "select * from CIM_Method where sourceInstance.prop1=20"
 subFilters[5] = "select * from CIM_InstCreation where sourceInstance.prop1=20"
 subFilters[6] = "select * from CIM_Deletion where sourceInstance.prop1=20"
 subFilters[7] = "select * from CIM_Modification where sourceInstance.prop1=20"
 subFilters[8] = "select * from CIM_Read where sourceInstance.prop1=20"
 subFilters[9] = "select * from CIM_Method where sourceInstance.prop1=20"

 classPath[0] = root/cimv2:test_b
 classPath[1] = root/cimv2:test_b
 classPath[2] = root/cimv2:test_b
 classPath[3] = root/cimv2:test_b
 classPath[4] = root/cimv2:test_b
 classPath[5] = root/cimv2:test_c
 classPath[6] = root/cimv2:test_c
 classPath[7] = root/cimv2:test_c
 classPath[8] = root/cimv2:test_c
 classPath[9] = root/cimv2:test_c

 eventType[0] = "CIM_InstCreation"
 eventType[1] = "CIM_InstDeletion"
 eventType[2] = "CIM_InstModification"
 eventType[3] = "CIM_InstRead"
 eventType[4] = "CIM_InstMethod"
 eventType[5] = "CIM_InstCreation"
 eventType[6] = "CIM_InstDeletion"
 eventType[7] = "CIM_InstModification"
 eventType[8] = "CIM_InstRead"
 eventType[9] = "CIM_InstMethod"
 
NOTE: eventType is not strictly needed as the Provider could extract it from the subFilters string. It is provided as a convenience.

Since:
WBEM 1.0

Method Summary
 void activateFilter(CIMInstance filter, CIMInstance handler, CIMInstance subscription, java.lang.String[] subFilters, CIMObjectPath[] classPath, java.lang.String[] eventType)
          Invoked by the CIMOM to ask the Provider to check for events.
 void authorizeFilter(CIMInstance filter, CIMInstance handler, CIMInstance subscription, java.lang.String[] subFilters, CIMObjectPath[] classPath, java.lang.String[] eventType)
          Invoked by a CIMOM to test if the given subscription is allowed.
 void deActivateFilter(CIMInstance filter, CIMInstance handler, CIMInstance subscription, java.lang.String[] subFilters, CIMObjectPath[] classPath, java.lang.String[] eventType)
          Invoked by the CIMOM to ask the Provider to deactivate an event filter.
 boolean[] mustPoll(CIMInstance filter, CIMInstance handler, CIMInstance subscription, java.lang.String[] subFilters, CIMObjectPath[] classPath, java.lang.String[] eventType)
          Invoked by a CIMOM to test if a given filter expression is allowed by the provider, and if it must be polled.
 
Methods inherited from interface javax.wbem.provider.CIMProvider
cleanup, initialize
 

Method Detail

authorizeFilter

public void authorizeFilter(CIMInstance filter,
                            CIMInstance handler,
                            CIMInstance subscription,
                            java.lang.String[] subFilters,
                            CIMObjectPath[] classPath,
                            java.lang.String[] eventType)
                     throws CIMException
Invoked by a CIMOM to test if the given subscription is allowed. The CIMOM will only call this method if the provider also implements the Authorizable interface.

Parameters:
filter - The CIM_IndicationFilter instance being subscribed to.

handler - The CIM_IndicationHandler instance that is the destination of the indication.

subscription - The subscription instance associating the filter and handler.

subFilters - See description for CIMIndicationProvider above

classPath - See description for CIMIndicationProvider above

eventType - See description for CIMIndicationProvider above

Throws:
CIMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
   CIM_ERR_ACCESS_DENIED,
   CIM_ERR_NOT_SUPPORTED (provider does not support this method),
   CIM_ERR_INVALID_PARAMETER (for this method),
   CIM_ERR_FAILED (some other unspecified error occurred)
 
See Also:
Authorizable

mustPoll

public boolean[] mustPoll(CIMInstance filter,
                          CIMInstance handler,
                          CIMInstance subscription,
                          java.lang.String[] subFilters,
                          CIMObjectPath[] classPath,
                          java.lang.String[] eventType)
                   throws CIMException
Invoked by a CIMOM to test if a given filter expression is allowed by the provider, and if it must be polled.

Parameters:
filter - The CIM_IndicationFilter instance being subscribed to.

handler - The CIM_IndicationHandler instance that is the destination of the indication.

subscription - The subscription instance associating the filter and handler.

subFilters - See description for CIMIndicationProvider above

classPath - See description for CIMIndicationProvider above

eventType - See description for CIMIndicationProvider above

Returns:
boolean array. Each element represents its corresponding subFilter. If true, the corresponding subFilter must be polled by the CIMOM. If false, the corresponding subFilter is not polled.

Throws:
CIMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
   CIM_ERR_ACCESS_DENIED,
   CIM_ERR_NOT_SUPPORTED (provider will not honor this filter),
   CIM_ERR_INVALID_PARAMETER (for this method),
   CIM_ERR_FAILED (some other unspecified error occurred)
 

activateFilter

public void activateFilter(CIMInstance filter,
                           CIMInstance handler,
                           CIMInstance subscription,
                           java.lang.String[] subFilters,
                           CIMObjectPath[] classPath,
                           java.lang.String[] eventType)
                    throws CIMException
Invoked by the CIMOM to ask the Provider to check for events.

Parameters:
filter - The CIM_IndicationFilter instance being subscribed to.

handler - The CIM_IndicationHandler instance that is the destination of the indication.

subscription - The subscription instance associating the filter and handler.

subFilters - See description for CIMIndicationProvider above

classPath - See description for CIMIndicationProvider above

eventType - See description for CIMIndicationProvider above

Throws:
CIMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
   CIM_ERR_ACCESS_DENIED,
   CIM_ERR_NOT_SUPPORTED (provider does not support this method)
   CIM_ERR_INVALID_PARAMETER (for this method),
   CIM_ERR_FAILED (Provider could not activat the filter)
 

deActivateFilter

public void deActivateFilter(CIMInstance filter,
                             CIMInstance handler,
                             CIMInstance subscription,
                             java.lang.String[] subFilters,
                             CIMObjectPath[] classPath,
                             java.lang.String[] eventType)
                      throws CIMException
Invoked by the CIMOM to ask the Provider to deactivate an event filter.

Parameters:
filter - The CIM_IndicationFilter instance being subscribed to.

handler - The CIM_IndicationHandler instance that is the destination of the indications.

subscription - The subscription instance associating the filter and handler.

subFilters - See description for CIMIndicationProvider above

classPath - See description for CIMIndicationProvider above

eventType - See description for CIMIndicationProvider above

Throws:
CIMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
   CIM_ERR_ACCESS_DENIED,
   CIM_ERR_NOT_SUPPORTED (provider does not support this method)
   CIM_ERR_INVALID_PARAMETER (for this method),
   CIM_ERR_FAILED (Provider could not deactivate the filter)