An event provider implements the EventProvider interface. This interface contains methods that the CIM Object Manager uses to notify the provider when a client has subscribed for indications of CIM events, and when a client has cancelled the subscription for CIM events. These methods also allow the provider to indicate whether or not the CIM Object Manager should poll for some event indications and whether or not 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 4-2 EventProvider Methods
Method |
Description |
---|---|
activateFilter |
When a client creates a subscription, the CIM Object Manager calls this method to ask the provider to check for CIM events. |
authorizeFilter |
When a client creates a subscription, the CIM Object Manager calls this method to test if the specified filter expression is allowed. |
deActivateFilter |
When a client removes a subscription, the CIM Object Manager calls this method to ask the provider to deactivate the specified event filter. |
mustPoll |
When a client creates a subscription, the CIM Object Manager calls this method to test if the specified filter expression is allowed by the provider, and if it must be polled. |
The CIM Object Manager 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 is the first filter for this event type. The deActivateFilter method takes the boolean lastActivation, indicating that this is the last filter for this event type.