In the Public Information model (Common information MODEL,CIM), the client application can subscribe to CIM event notifications. Typically, an application can create event filters with multiple event handlers through different connection ports, but this consumes a lot of network resources and increases maintenance complexity. In this article, see How to register multiple CIM event handlers with a specific connection port. Also see some tips on how to write code with the Sblim CIM client library.
Let's look at some key words first. The Distributed Management Task Team (distributed Management task FORCE,DMTF) Public Information Model (Common information MODEL,CIM) is a description of the enterprise environment and the Internet Conceptual information model for computational entities and business entities in the environment. It will provide a consistent data definition and structure using object-oriented technology.
CIM Events are an interesting phenomenon that can be categorized by life cycle or warning. The CIM event is complex and involves a wide range of topics and scenarios. In the CIM schema, client applications can subscribe to notifications for CIM events. Typically, an application can create event filters with related event handlers through multiple connection ports.
In this article, we'll show you how to register a CIM event handler with a specific connection port to avoid adding complexity. This will make it easier for you to implement and maintain a specific, operable CIM event model with minimal network resources.
Overview of the CIM event model
The CIM event model defines the abstraction associated with the event. It describes the CIM presentation hierarchy and how representations are used for model events. The event model also describes how to register with subscriptions so that you can receive representations.
Indicates that there can be 0 or more event triggers that recognize state changes. For example, if a trigger is touched because of a volume creation, this event will get a lifecycle representation of a volume creation. In another example, if the trigger is triggered by unplugging the disk, this event will get a warning indication that the disk has been unplugged.
The CIM operating specification based on HTTP (see Resources for links) describes the Cim-xml standard for sending and receiving CIM representations. Figure 1 shows the full workflow of the CIM event model:
Figure 1. Workflow for the CIM event model
The entire operational process consists of the following steps: The CIM client will issue a CIM server process request that will create a network-based subscription; the main function of the procedure will be registered to receive the representation. The CIM Object Manager (CIMOM) receives the request and checks its validation. Subsequently, CIMOM will create a CIM representation filter, a CIM representation handler, and a CIM representation subscription in CIMOM Repository. CIMOM will contact the CIM indication Provider to request that the provider respond to a request from CIMOM to generate the appropriate representation. When the provider generates representations, CIMOM routes the representations to the CIM indication Listener specified by the CIM representation handler instance. These instances are created by subscribers in the CIMOM Repository.
Technically, when a customer registers to receive representations in the CIM event model, you need to create three CIM instances: the CIM Indication Filter:Cim_indicationfilter instance, which defines a collection of representations that represent the interest of the consumer. CIM Indication Handler: Cim_listenerdestination instance that describes the location, encoding, and transport protocols that represent the consumer. CIM Indication Subscription: Cim_indicationsubscription instance, used to describe the presentation process. The process is specified by a referenced presentation filter and directed to a reference target or handled in a presentation handler.
The CIM presentation class hierarchy is used to describe the types of events that can be detected when a subscription is correctly defined. The Cim_indication instance represents the occurrence of the event. Typically, a presentation is an object that is short-lived, and is used to pass information from the presentation Builder to 0 or more presentation consumers. The following are the relevant CIM representation classes defined in the CIM event model:
This article has been transferred from IBM Developerworks China
Please click here to view the full text