javax.wbem.client

Interface WBEMClient

public interface WBEMClient

The WBEMClient interface is use to invoke WBEM operations against a WBEM Server. A WBEMClient implementation can be retrieved from the WBEMClientFactory specifying the protocol to be used.

See Also: WBEMClientFactory

Method Summary
CloseableIteratorassociatorNames(CIMObjectPath pObjectName, String pAssociationClass, String pResultClass, String pRole, String pResultRole)
Enumerates the CIMObjectPaths of CIM Objects that are associated to a particular source CIM Object.
CloseableIteratorassociators(CIMObjectPath pObjectName, String pAssociationClass, String pResultClass, String pRole, String pResultRole, boolean pIncludeQualifiers, boolean pIncludeClassOrigin, String[] pPropertyList)
Enumerates CIM Objects that are associated to a specified source CIM Object.
voidclose()
Closes the connection.
voidcreateClass(CIMClass pClass)
Create a CIM class The namespace from the CIMClass.getObjectPath() will be used.
CIMObjectPathcreateInstance(CIMInstance pInstance)
Create a CIM Instance.
voiddeleteClass(CIMObjectPath pPath)
Deletes the CIM class for the object specified by the CIM object path.
voiddeleteInstance(CIMObjectPath pPath)
Delete the CIM instance specified by the CIM object path.
voiddeleteQualifierType(CIMObjectPath pPath)
Delete a CIM Qualfier Type
CloseableIteratorenumerateClasses(CIMObjectPath pPath, boolean pDeep, boolean pPropagated, boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
Enumerate CIM Classes.
CloseableIteratorenumerateClassNames(CIMObjectPath pPath, boolean pDeep)
Enumerate the names of CIM Classes.
CloseableIteratorenumerateInstanceNames(CIMObjectPath pPath)
Enumerate the names of the instances for a specified class.
CloseableIteratorenumerateInstances(CIMObjectPath pPath, boolean pDeep, boolean pPropagated, boolean pIncludeClassOrigin, String[] pPropertyList)
Enumerate the instances of a class.
CloseableIteratorenumerateQualifierTypes(CIMObjectPath pPath)
Enumerates the CIM Qualfiier Types for a specific namespace
CloseableIteratorexecQuery(CIMObjectPath pPath, String pQuery, String pQueryLanguage)
ExecQuery will execute a query to retrieve objects.
CIMClassgetClass(CIMObjectPath pName, boolean pPropagated, boolean pIncludeQualifiers, boolean pIncludeClassOrigin, String[] pPropertyList)
Returns the CIMClass for the specified CIMObjectPath .
CIMInstancegetInstance(CIMObjectPath pName, boolean pPropagated, boolean pIncludeClassOrigin, String[] pPropertyList)
Get a CIMInstance.
StringgetProperty(String pKey)
Get protcol specific property values.
CIMQualifierTypegetQualifierType(CIMObjectPath pName)
Get a CIMQualifierType.
voidinitialize(CIMObjectPath pName, Subject pSubject, Locale[] pLocales)
Initialize the client connection.
ObjectinvokeMethod(CIMObjectPath pName, String pMethodName, CIMArgument[] pInputArguments, CIMArgument[] pOutputArguments)
Executes the specified method on the specified object.
voidmodifyClass(CIMClass pClass)
Modify the CIMClass.
voidmodifyInstance(CIMInstance ci, String[] propertyList)
Modify some or all of the properties of the specified CIMInstance.
CloseableIteratorreferenceNames(CIMObjectPath pObjectName, String pResultClass, String pRole)
Enumerates the CIMObjectPaths of Association Objects that are refer to a particular source CIM Object.
CloseableIteratorreferences(CIMObjectPath pObjectName, String pResultClass, String pRole, boolean pIncludeQualifiers, boolean pIncludeClassOrigin, String[] pPropertyList)
Enumerates the Association Objects that refer to a specified source CIM Object.
voidsetLocales(Locale[] pLocales)
Change the locales that were provided during initialization.
voidsetProperty(String pKey, String pValue)
Set protocol specific properties.
voidsetQualifierType(CIMQualifierType pQualifierType)
Add a CIMQualifierType to the specified namespace if it does not already exist.

Method Detail

associatorNames

public CloseableIterator associatorNames(CIMObjectPath pObjectName, String pAssociationClass, String pResultClass, String pRole, String pResultRole)
Enumerates the CIMObjectPaths of CIM Objects that are associated to a particular source CIM Object. If the source Object is a CIM Class, then an Enumeration of CIMObjectPaths of the classes associated to the source Object is returned. If the source Object is a CIM Instance, then an Enumeration of CIMObjectPaths of the CIMInstance objects associated to the source Object is returned.

Parameters: pObjectName

CIMObjectPath defining the source CIM Object whose associated Objects are to be returned. This argument may contain either a Class name or the modelpath of an Instance. (i.e. Keys populated)

pAssociationClass

This string MUST either contain a valid CIM Association class name or be null. It filters the Objects returned to contain only Objects associated to the source Object via this CIM Association class or one of its subclasses.

pResultClass

This string MUST either contain a valid CIM Class name or be null. It filters the Objects returned to contain only the Objects of this Class name or one of its subclasses.

pRole

This string MUST either contain a valid Property name or be null. It filters the Objects returned to contain only Objects associated to the source Object via an Association class in which the source Object plays the specified role. (i.e. the Property name in the Association class that refers to the source Object matches this value) If "Antecedent" is specified, then only Associations in which the source Object is the "Antecedent" reference are examined.

pResultRole

This string MUST either contain a valid Property name or be null. It filters the Objects returned to contain only Objects associated to the source Object via an Association class in which the Object returned plays the specified role. (i.e. the Property name in the Association class that refers to the Object returned matches this value) If "Dependent" is specified, then only Associations in which the Object returned is the "Dependent" reference are examined.

Returns: If successful, a Closeable Iterator containing zero or more CIMObjectPath objects of the CIM Classes or CIM Instances meeting the specified criteria is returned.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is: CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters
CIM_ERR_FAILED (some other unspecified error occurred)

associators

public CloseableIterator associators(CIMObjectPath pObjectName, String pAssociationClass, String pResultClass, String pRole, String pResultRole, boolean pIncludeQualifiers, boolean pIncludeClassOrigin, String[] pPropertyList)
Enumerates CIM Objects that are associated to a specified source CIM Object. If the source Object is a CIM Class, then an Enumeration of CIMClass objects is returned containing the classes associated to the source Object. If the source Object is a CIM Instance, then an Enumertion of CIMInstance objects is returned containing the instances associated to the source Object.

Parameters: pObjectName

CIMObjectPath defining the source CIM Object whose associated Objects are to be returned. This argument may contain either a Class name or the modelpath of an Instance. (i.e. Keys populated)

pAssociationClass

This string MUST either contain a valid CIM Association class name or be null. It filters the Objects returned to contain only Objects associated to the source Object via this CIM Association class or one of its subclasses.

pResultClass

This string MUST either contain a valid CIM Class name or be null. It filters the Objects returned to contain only the Objects of this Class name or one of its subclasses.

pRole

This string MUST either contain a valid Property name or be null. It filters the Objects returned to contain only Objects associated to the source Object via an Association class in which the source Object plays the specified role. (i.e. the Property name in the Association class that refers to the source Object matches this value) If "Antecedent" is specified, then only Associations in which the source Object is the "Antecedent" reference are examined.

pResultRole

This string MUST either contain a valid Property name or be null. It filters the Objects returned to contain only Objects associated to the source Object via an Association class in which the Object returned plays the specified role. (i.e. the Property name in the Association class that refers to the Object returned matches this value) If "Dependent" is specified, then only Associations in which the Object returned is the "Dependent" reference are examined.

pIncludeQualifiers

If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included in the Objects returned. If false, no Qualifiers are present in each Object returned.

pIncludeClassOrigin

If true, the CLASSORIGIN attribute will be present on all appropriate elements in the Objects returned. If false, no CLASSORIGIN attributes are present in the Objects returned. CLASSORIGIN is attached to an element (properties, methods, references) to indicate the class in which it was first defined.

pPropertyList

An array of property names used to filter what is contained in the Objects returned. Each CIMClass or CIMInstance returned only contains elements for the properties of the names specified. Duplicate and invalid property names are ignored and the request is otherwise processed normally.
An empty array indicates that no properties should be included in the Objects returned.
A null value indicates that all properties should be contained in the Objects returned.
NOTE: Properties should not be specified in this parameter unless a non-null value is specified in the resultClass parameter.

Returns: If successful, a CloseableIterator containing zero or more CIMClass or CIMInstance Objects meeting the specified criteria is returned.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is: CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters
CIM_ERR_FAILED (some other unspecified error occurred)

close

public void close()
Closes the connection.

createClass

public void createClass(CIMClass pClass)
Create a CIM class The namespace from the CIMClass.getObjectPath() will be used.

Parameters: pClass - The CIMClass to be created.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_ALREADY_EXISTS (the CIM Class already exists)
CIM_ERR_INVALID_SUPERCLASS (the putative CIM Class declares a non-existent superclass)
CIM_ERR_FAILED (some other unspecified error occurred)

createInstance

public CIMObjectPath createInstance(CIMInstance pInstance)
Create a CIM Instance. The namespace from the CIMInstance.getObjectPath() will be used. The keys of the CIMInstance may be modified by the implementation and the client must use the returned object path to determine the name of the instance. It is possible for a client to leave keys of instances empty/null and the provider can fill them in. This is implementation specific unless specified by a the CIM Schema or in a DMTF Profile.

Parameters: pInstance - The CIMInstance to be created.

Returns: CIMObjectPath of the instance created.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED (provider does not support this method)
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (for this method)
CIM_ERR_INVALID_CLASS (in this namespace)
CIM_ERR_ALREADY_EXISTS
CIM_ERR_FAILED (some other unspecified error occurred)

deleteClass

public void deleteClass(CIMObjectPath pPath)
Deletes the CIM class for the object specified by the CIM object path.

Parameters: pPath - The CIMObjectPath identifying the namespace and class name to delete.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_NOT_FOUND (the CIM Class to be deleted does not exisT)
CIM_ERR_CLASS_HAS_CHILDREN (the CIM Class has one or more subclasses which cannot be deleted)
CIM_ERR_CLASS_HAS_INSTANCES (the CIM Class has one or more instances which cannot be deleted)
CIM_ERR_FAILED (some other unspecified error occurred)

deleteInstance

public void deleteInstance(CIMObjectPath pPath)
Delete the CIM instance specified by the CIM object path.

Parameters: pPath - The object path of the instance to be deleted. It must include all of the keys.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED (provider does not support this method)
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (for this method)
CIM_ERR_INVALID_CLASS (in this namespace)
CIM_ERR_NOT_FOUND (if the instance does not exist)
CIM_ERR_FAILED (some other unspecified error occurred)

deleteQualifierType

public void deleteQualifierType(CIMObjectPath pPath)
Delete a CIM Qualfier Type

Parameters: pPath - the CIMObjectPath identifying the name and namespace of the CIM qualifier type to delete

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (for this method)
CIM_ERR_NOT_FOUND (the Qualifier did not exist)
CIM_ERR_FAILED (some other unspecified error occurred)

enumerateClasses

public CloseableIterator enumerateClasses(CIMObjectPath pPath, boolean pDeep, boolean pPropagated, boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
Enumerate CIM Classes.

Parameters: pPath

The object path of the class to be enumerated. Only the name space and class name components are used. All other information (e.g. Keys) is ignored.

pDeep

If true, the enumeration returned contains the specified class and all subclasses. If false, the enumeration returned contains only the contents of the first level children of the specified class.

pPropagated

If true, only elements (properties, methods and qualifiers) defined in, or overridden in the class are included in the response. If false, all elements of the class definition are returned.

pIncludeQualifiers

If true, all Qualifiers for each Class and its elements ( properties, methods, references). If false, no Qualifiers are present in the classes returned.

pIncludeClassOrigin

If true, the CLASSORIGIN attribute MUST be present on all appropriate elements in each classes returned. If false, no CLASSORIGIN attributes are present in each class returned. CLASSORIGIN is attached to an element to indicate the class in which it was first defined.

Returns: a CloseableIterator of CIMClasses.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_INVALID_CLASS (the CIM Class that is the basis for this enumeration does not exist)
CIM_ERR_FAILED (some other unspecified error occurred)

enumerateClassNames

public CloseableIterator enumerateClassNames(CIMObjectPath pPath, boolean pDeep)
Enumerate the names of CIM Classes.

Parameters: pPath

The CIMObjectPath identifying the class to be enumerated. If the class name in the object path specified is null, all base classes in the target namespace are returned.

pDeep

If true, the enumeration returned will contain the names of all classes derived from the class being enumerated. If false , the enumeration returned contains only the names of the first level children of the class.

Returns: a CloseableIterator of CIMObjectPaths

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_INVALID_CLASS (the CIM Class that is the basis for this enumeration does not exist)
CIM_ERR_FAILED (some other unspecified error occurred)

enumerateInstanceNames

public CloseableIterator enumerateInstanceNames(CIMObjectPath pPath)
Enumerate the names of the instances for a specified class. The names of all subclass instances are returned.

Parameters: pPath

The CIMObjectPath identifying the class whose instances are to be enumerated. Only the name space and class name components are used. All other information (e.g. Keys) is ignored.

Returns: CloseabelIterator of CIMObjectPaths.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED (provider does not support this method)
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (for this method)
CIM_ERR_INVALID_CLASS (in this namespace)
CIM_ERR_FAILED (some other unspecified error occurred)

enumerateInstances

public CloseableIterator enumerateInstances(CIMObjectPath pPath, boolean pDeep, boolean pPropagated, boolean pIncludeClassOrigin, String[] pPropertyList)
Enumerate the instances of a class. The instances of all subclasses are also returned.

Parameters: pPath

The object path of the class to be enumerated. Only the name space and class name components are used. Any other information (e.g. Keys) is ignored.

pDeep

If true, the enumeration returned contains all instances of the specified class and all classes derived from it. If false , only names of instances of the specified class are returned.

pPropagated

If true, only elements (properties, methods, references) overridden or defined in the class are included in the instances returned.

pIncludeClassOrigin

If true, the CLASSORIGIN attribute will be present on all appropriate elements in the instances returned. If false, no CLASSORIGIN attributes are present in the instances returned. CLASSORIGIN is attached to an element (properties, methods, references) to indicate the class in which it was first defined.

pPropertyList

An array of property names used to filter what is contained in the instances returned. Each instance returned only contains elements for the properties of the names specified. Duplicate and invalid property names are ignored and the request is otherwise processed normally. An empty array indicates that no properties should be returned. A null value indicates that all properties should be returned.

Returns: a CloseableIterator of CIMInstances

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (for this method)
CIM_ERR_INVALID_CLASS (in this namespace)
CIM_ERR_FAILED (some other unspecified error occurred)

enumerateQualifierTypes

public CloseableIterator enumerateQualifierTypes(CIMObjectPath pPath)
Enumerates the CIM Qualfiier Types for a specific namespace

Parameters: pPath

The CIMObjectPath identifying the namespace whose qualifier types are to be enumerated.

Returns: a CloseableIterator of CIMQualifierTypes

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)

execQuery

public CloseableIterator execQuery(CIMObjectPath pPath, String pQuery, String pQueryLanguage)
ExecQuery will execute a query to retrieve objects.

Parameters: pPath

CIMObjectPath identifying the class to query. Only the namespace and class name components are used. All other information (e.g. Keys) is ignored.

pQuery

A string containing the text of the query.

pQueryLanguage

A string that identifies the query language to use to parse the query string specified.

Returns: A CloseableIterator of CIMInstances.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED (provider does not support this method)
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED (the requested query language is not recognized)
CIM_ERR_INVALID_QUERY (the query is not a valid query in the specified query language)
CIM_ERR_FAILED (some other unspecified error occurred)

getClass

public CIMClass getClass(CIMObjectPath pName, boolean pPropagated, boolean pIncludeQualifiers, boolean pIncludeClassOrigin, String[] pPropertyList)
Returns the CIMClass for the specified CIMObjectPath .

Parameters: pName

The object path of the class to be returned. Only the name space and class name components are used. All other information (e.g. keys) is ignored.

pPropagated

If true, only elements (properties, methods, references) overridden or defined in the class are included in the CIMClass returned. If false, all elements of the class definition are returned.

pIncludeQualifiers

If true, all Qualifiers for the class and its elements are included in the CIMClass returned. If false , no Qualifier information is contained in the CIMClass returned.

pIncludeClassOrigin

The class origin attribute is the name of the class that either originally defined or overrode the definition of the property or method. If true, the class Origin attribute will be present on all CIMClasses. If false, the class origin will not be present. pPropertyList

An array of property names used to filter what is contained in the CIMClass returned. The CIMClass returned only contains elements for the properties of the names specified. Duplicate and invalid property names are ignored and the request is otherwise processed normally. An empty array indicates that no properties should be returned. A null value indicates that all properties should be returned.

Returns: CIMClass meeting the criteria specified.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_NOT_FOUND (the request CIM Class does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)

getInstance

public CIMInstance getInstance(CIMObjectPath pName, boolean pPropagated, boolean pIncludeClassOrigin, String[] pPropertyList)
Get a CIMInstance.

Parameters: pName

The object path of the instance to be returned. The Keys in this CIMObjectPath must be populated.

pPropagated

If true, only elements (properties, methods, references) overridden or defined in the class are included in the CIMInstance returned. If false, all elements of the class definition are returned.

pIncludeClassOrigin

If true, the CLASSORIGIN attribute will be present on all appropriate elements in the CIMInstance returned. If false, no CLASSORIGIN attributes are present in the CIMInstance returned. CLASSORIGIN is attached to an element (properties, methods, references) to indicate the class in which it was first defined.

pPropertyList

An array of property names used to filter what is contained in the CIMClass returned. The CIMClass returned only contains elements for the properties of the names specified. Duplicate and invalid property names are ignored and the request is otherwise processed normally. An empty array indicates that no properties should be returned. A null value indicates that all properties should be returned.

Returns: CIMInstance identified by the CIMObjectPath specified.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED (provider does not support this method)
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (for this method)
CIM_ERR_INVALID_CLASS (in this namespace)
CIM_ERR_NOT_FOUND (if instance does not exist)
CIM_ERR_FAILED (some other unspecified error occurred)

getProperty

public String getProperty(String pKey)
Get protcol specific property values. Please refer to the documentation for the specific protocol for a list of properties supported.

Parameters: pKey - The name of the property

Returns: The value of the property.

getQualifierType

public CIMQualifierType getQualifierType(CIMObjectPath pName)
Get a CIMQualifierType.

Parameters: pName

CIMObjectPath that identifies the CIMQualifierType to return.

Returns: The CIMQualifierType object

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_NOT_FOUND (the requested Qualifier declaration did not exist)
CIM_ERR_FAILED (some other unspecified error occurred)

initialize

public void initialize(CIMObjectPath pName, Subject pSubject, Locale[] pLocales)
Initialize the client connection. This must be called before any operations.

Parameters: pName

The protocol and host to use (e.g. http://192.168.1.128/). Any other fields will be ignored.

pSubject

The principal/credential pairs for this connection.

pLocales

An array of locales in order of priority of preference.

Throws: IllegalArgumentException

If the host or scheme portion of the object path is null. If the protocol is not supported.

WBEMException

If the protocol adapter or security can not be initialized

invokeMethod

public Object invokeMethod(CIMObjectPath pName, String pMethodName, CIMArgument[] pInputArguments, CIMArgument[] pOutputArguments)
Executes the specified method on the specified object.

Parameters: pName

CIM object path of the object whose method must be invoked. It must include all of the keys.

pMethodName

the name of the method to be invoked.

pInputArguments

the CIMArgument array of method input parameters.

pOutputArguments

the CIMArgument array of method output parameters. The array should be allocated large enough to hold all returned parameters, but should not initialize any elements.

Returns: The return value of the specified method.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED (CIM Server DOES NOT support ANY Extrinsic Method Invocation)
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (for this method)
CIM_ERR_NOT_FOUND (if instance does not exist)
CIM_ERR_METHOD_NOT_FOUND
CIM_ERR_METHOD_NOT_AVAILABLE
CIM_ERR_FAILED (some other unspecified error occurred)

modifyClass

public void modifyClass(CIMClass pClass)
Modify the CIMClass.

Parameters: pClass - CIMClass to be modified

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_INVALID_SUPERCLASS (the putative CIM Class declares a non-existent superclass)
CIM_ERR_CLASS_HAS_CHILDREN (the modification could not be performed because it was not possible to update the subclasses of the Class in a consistent fashion)
CIM_ERR_CLASS_HAS_INSTANCES (the modification could not be performed because it was not possible to update the instances of the Class in a consistent fashion)
CIM_ERR_FAILED (some other unspecified error occurred)

modifyInstance

public void modifyInstance(CIMInstance ci, String[] propertyList)
Modify some or all of the properties of the specified CIMInstance.

Parameters: ci - CIMInstance to be modified. All Keys must be populated. propertyList

An array of property names used to specify which values from the CIMInstance specified to set. Properties not specified in this list but set in the CIMInstance specified are not modified. Duplicate and invalid property names are ignored and the request is otherwise processed normally. An empty array indicates that no properties should be modified. A null value indicates that all properties should be modified.

Throws: WBEMException - If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED,
CIM_ERR_NOT_SUPPORTED (provider does not support this method),
CIM_ERR_INVALID_NAMESPACE,
CIM_ERR_INVALID_PARAMETER (for this method),
CIM_ERR_INVALID_CLASS (in this namespace),
CIM_ERR_NOT_FOUND (if instance does not exist),
CIM_ERR_NO_SUCH_PROPERTY (in this instance),
CIM_ERR_FAILED (some other unspecified error occurred)

referenceNames

public CloseableIterator referenceNames(CIMObjectPath pObjectName, String pResultClass, String pRole)
Enumerates the CIMObjectPaths of Association Objects that are refer to a particular source CIM Object. If the source Object is a CIM Class, then an Enumeration of CIMObjectPaths of the Association classes that refer to the source Object is returned. If the source Object is a CIM Instance, then an Enumeration of CIMObjectPaths of the CIMInstance objects that refer to the source Object is returned.

Parameters: pObjectName

CIMObjectPath defining the source CIM Object whose referring Objects are to be returned. This argument may contain either a Class name or the modelpath of an Instance. (i.e. Keys populated)

pResultClass

This string MUST either contain a valid CIM Class name or be null. It filters the Objects returned to contain only the Objects of this Class name or one of its subclasses.

pRole

This string MUST either contain a valid Property name or be null. It filters the Objects returned to contain only Objects referring to the source Object via a Property with the specified name. If "Antecedent" is specified, then only Associations in which the source Object is the "Antecedent" reference are returned.

Returns: If successful, a CloseableIterator referencing zero or more CIMObjectPaths of CIMClasses or CIMInstances meeting the specified criteria.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)

references

public CloseableIterator references(CIMObjectPath pObjectName, String pResultClass, String pRole, boolean pIncludeQualifiers, boolean pIncludeClassOrigin, String[] pPropertyList)
Enumerates the Association Objects that refer to a specified source CIM Object. If the source Object is a CIM Class, an Enumeration of CIMClass objects is returned containing the Association classes that refer to the source Object. If the source Object is a CIM Instance, an Enumeration of CIMInstance objects is returned containing the Association class instances that refer to the source Object.

Parameters: pObjectName

CIMObjectPath defining the source CIM Object whose referring Objects are to be returned. This argument may contain either a Class name or the modelpath of an Instance. (i.e. Keys populated)

pResultClass

This string MUST either contain a valid CIM Class name or be null. It filters the Objects returned to contain only the Objects of this Class name or one of its subclasses.

pRole

This string MUST either contain a valid Property name or be null. It filters the Objects returned to contain only Objects referring to the source Object via a Property with the specified name. If "Antecedent" is specified, then only Associations in which the source Object is the "Antecedent" reference are returned.

pIncludeQualifiers

If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included in the Objects returned. If false, no Qualifiers are present in each Object returned.

pIncludeClassOrigin

If true, the CLASSORIGIN attribute will be present on all appropriate elements in the Objects returned. If false, no CLASSORIGIN attributes are present in the Objects returned. CLASSORIGIN is attached to an element (properties, methods, references) to indicate the class in which it was first defined.

pPropertyList

An array of property names used to filter what is contained in the Objects returned. Each CIMClass or CIMInstance returned only contains elements for the properties of the names specified. Duplicate and invalid property names are ignored and the request is otherwise processed normally. An empty array indicates that no properties should be included in the Objects returned. A null value indicates that all properties should be contained in the Objects returned. NOTE: Properties should not be specified in this parameter unless a non-null value is specified in the resultClass parameter.

Returns: If successful, a CloseableIterator referencing zero or more CIMClass or CIMInstances meeting the specified criteria.

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)

setLocales

public void setLocales(Locale[] pLocales)
Change the locales that were provided during initialization.

Parameters: pLocales - An array of locales in order of priority of preference.

Throws: UnsupportedOperationException

If the method is not supported. Some protocols may only allow the locales to be set during initialization.

setProperty

public void setProperty(String pKey, String pValue)
Set protocol specific properties. For example, a protocol may support a timeout option for an operation. For CIM-XML, the timeout is javax.wbem.client.cim-xml.timeout Please refer to the documentation for the specific protocol for a list of properties supported.

Parameters: pKey - The name of the property pValue - The value of the property

Throws: IllegalArgumentException - if the name is not a supported property name.

setQualifierType

public void setQualifierType(CIMQualifierType pQualifierType)
Add a CIMQualifierType to the specified namespace if it does not already exist. Otherwise, it modifies the qualifier type to the value specified.

Parameters: pQualifierType - the CIM qualifier type to be added

Throws: WBEMException

If unsuccessful, one of the following status codes must be returned. The ORDERED list is:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)

Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.