The code segment in Example 5–2 creates a property provider (fruit_prop_provider) class that is registered in Example 5–2. The fruit_prop_provider implements the PropertyProvider interface.
This sample property provider illustrates the getPropertyValue method, which returns a property value for the specified class, parent class, and property name. A CIM property is defined by its name and origin class. Two or more properties can have the same name, but the origin class uniquely identifies the property.
... public class SimplePropertyProvider implements PropertyProvider{ public void initialize(CIMOMHandle cimom) throws CIMException { } public void cleanup() throws CIMException { } public CIMValue getPropertyValue(CIMObjectpath op, string originclass, string PropertyName){ if (PropertyName.equals("A") return new CIMValue("ValueA") else return new CIMValue("ValueB"); } ... }