Class CimInstance

All Implemented Interfaces:
CimEventGenerator

public class CimInstance extends StructureValue
Class to represent a CIM Instance. CIM Instances are active elements that can have properties and operations, and provide the ability to model control plane elements. Instances can be bound to java classes that can perform the corresponding actions within the managed environment. Instances can be created from corresponding class templates.
Author:
Sharad Singhal
See Also:
  • Method Details

    • createInstance

      public static CimInstance createInstance(CimClass creationClass, Map<String,DataValue> propertyValues, String alias)
      Create a new CimInstance
      Parameters:
      creationClass - - class to be used as a template for this instance
      propertyValues - - properties for this instance
      alias - - alias, if any for this instance
      Returns:
      - newly constructed CIMInstance
    • bind

      public Object bind()
      Bind this Cim Instance to a java object, and return the corresponding java object
      Overrides:
      bind in class StructureValue
      Returns:
      Java Object bound to this CIM Instance
    • getCreationClass

      public CimClass getCreationClass()
      Get the underlying Cimclass used to create this instance
      Returns:
      - underlying CimClass
    • getMethodNames

      public Set<String> getMethodNames()
      Get the names of all methods defined in this instance
      Returns:
      - names of all methods in this instance
    • getMethodReturnType

      public DataType getMethodReturnType(String methodName)
      Get the return type for a declared method in this instance
      Parameters:
      methodName - - name of the desired method
      Returns:
      return type for the method. Null if no such method defined
    • getMethodParameters

      public List<CimParameter> getMethodParameters(String methodName)
      Get the parameters associated with a declared method in this instance
      Parameters:
      methodName - - name of the desired method
      Returns:
      - paramters associated with the method. Null if no such method defined
    • invokeMethod

      public DataValue invokeMethod(String methodName, List<CimParameter> cimParameters)
      Invoke a method on this instance
      Parameters:
      methodName - - name of the method to invoke
      cimParameters - - parameters required by the method
      Returns:
      - returned value from the method
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class StructureValue
    • getName

      public String getName()
      Get the name of this element
      Returns:
      - name of this element
      See Also:
    • getLowerCaseName

      public String getLowerCaseName()
      Get the case-normalized (lower case) name for this element
      Returns:
      - name of this element normalized to lower case
      See Also:
    • getElementType

      public ElementType getElementType()
      Get the CIM type of this element
      Returns:
      - CIMType for this element
      See Also:
    • toMOF

      public String toMOF()
      Return the MOF representation of this element
      Returns:
      - String containing MOF representation of this element
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object