An event provider implements the EventProvider interface. This interface contains methods that the CIMOM uses to notify the provider when a client has subscribed for indications of CIM events. This method is also used when a client has cancelled the subscription for CIM events. These methods allow the provider to indicate whether the CIMOM should poll for some event indications and whether the provider should authorize the return of an indication to a handler.
The following table lists the methods in the EventProvider interface that must be implemented by an event provider.
Table 6–2 EventProvider Methods
Method |
Description |
---|---|
activateFilter |
When a client creates a subscription, the CIMOM calls this method to ask the provider to check for CIM events. |
authorizeFilter |
When a client creates a subscription, the CIMOM calls this method to test if the specified filter expression is allowed. |
deActivateFilter |
When a client removes a subscription, the CIMOM calls this method to ask the provider to deactivate the specified event filter. |
mustPoll |
When a client creates a subscription, the CIMOM calls this method to test whether the specified filter expression is allowed by the provider, and if it must be polled. |
The CIMOM passes values for the following arguments to all methods:
filter – SelectExp that specifies the CIM events for which indications must be generated.
eventType – String that specifies the type of CIM event, which can also be extracted from the FROM clause of the select expression.
classPath – CIMObjectPath that specifies the name of the class for which the event is required.
In addition, the activateFilter method takes the boolean firstActivation, indicating that this filter is the first filter for this event type. The deActivateFilter method takes the boolean lastActivation, indicating that this filter is the last filter for this event type.