Class and Instances

[This is preliminary documentation and subject to change.]

A Web-Based Enterprise Management (WBEM) class defines a template for describing a type of managed object. An instance of a WBEM class represents a specific managed object of the type described by the class. Where the class generally models the real-world device or component in the general sense, each instance represents a specific occurrence of the device or component. For example, while there might be a general class called FloppyDisk, the instances on a particular host machine might represent drives "A" and "B".

Some WBEM classes permit the creation of instances; others do not. Abstract base classes are used solely as templates for derived classes. The __Event system class, for example, is an abstract class. Real world events are modelled using classes that are derived from the __Event class. Instances are created from the __Event subclasses. Another type of class supports only a single instance; such classes are known as singleton classes.

All instances of a class exist within the namespace to which the class belongs. Within a namespace,instances can be either static or dynamic. Static instances are persistently stored and remain valid until explicitly deleted, even across system reboots. Static instances are manually placed in the CIMOM repository using IWbemServices::PutInstance or IWbemServices::PutInstanceAsync or through a MOF definition submitted to the MOF compiler.

Dynamic instances are supplied by a provider when the need arises and are not stored in the CIMOM repository. Requests for dynamic instances are forwarded through CIMOM to the provider for the class. Supporting instances of a class dynamically allows a provider to always supply up-to-the-minute property values.

Static classes can support either static or dynamic instances. Within a static instance, either static or dynamic properties can exist. A static class that supports only static instances containing static properties is always available through CIMOM. Provider involvement is unnecessary.

Static classes with dynamic instances store only the class definition in the CIMOM repository. When instances are requested, a provider must retrieve the class definition and build the required instance or set of instances on demand.

Static classes with static instances containing both static and dynamic properties store placeholders for the dynamic properties in the CIMOM repository. When a request is made for an instance, a provider must be summoned to supply the actual data for each dynamic property.

Dynamic classes support only dynamic instances. With a dynamic class, neither the class definition nor the instances are stored in the CIMOM repository. The provider responsible for a dynamic class stores information about its location. When an application requests a dynamic class, CIMOM locates the provider and forwards the request.