javax.wbem.client
Interface WBEMClient

All Known Subinterfaces:
ProviderHandle

public interface WBEMClient

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

Since:
JSR48 1.0.0
See Also:
WBEMClientFactory

Method Summary
 CloseableIterator associatorNames(CIMObjectPath objectName, java.lang.String assocClass, java.lang.String resultClass, java.lang.String role, java.lang.String resultRole)
          Enumerates the CIMObjectPaths of CIM Objects that are associated to a particular source CIM Object.
 CloseableIterator associators(CIMObjectPath objectName, java.lang.String assocClass, java.lang.String resultClass, java.lang.String role, java.lang.String resultRole, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Enumerates CIM Objects that are associated to a specified source CIM Object.
 void close()
          Closes the connection,
 void createClass(CIMClass cc)
          Create a CIM class The namespace from the CIMClass.getObjectPath() will be used.
 CIMObjectPath createInstance(CIMInstance ci)
          Create a CIM Instance.
 void deleteClass(CIMObjectPath path)
          Deletes the CIM class for the object specified by the CIM object path.
 void deleteInstance(CIMObjectPath path)
          Delete the CIM instance specified by the CIM object path.
 void deleteQualifierType(CIMObjectPath path)
          Delete a CIM Qualfier Type
 CloseableIterator enumerateClasses(CIMObjectPath path, boolean deep, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin)
          Enumerate CIM Classes.
 CloseableIterator enumerateClassNames(CIMObjectPath path, boolean deep)
          Enumerate the names of CIM Classes.
 CloseableIterator enumerateInstanceNames(CIMObjectPath path)
          Enumerate the names of the instances for a specified class.
 CloseableIterator enumerateInstances(CIMObjectPath path, boolean deep, boolean localOnly, boolean includeClassOrigin, java.lang.String[] propertyList)
          Enumerate the instances of a class.
 CloseableIterator enumerateQualifierTypes(CIMObjectPath path)
          Enumerates the CIM Qualfiier Types for a specific namespace
 CloseableIterator execQuery(CIMObjectPath path, java.lang.String query, java.lang.String queryLanguage)
          ExecQuery will execute a query to retrieve objects.
 CIMClass getClass(CIMObjectPath name, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Returns the CIMClass for the specified CIMObjectPath.
 CIMInstance getInstance(CIMObjectPath name, boolean localOnly, boolean includeClassOrigin, java.lang.String[] propertyList)
          Get a CIMInstance.
 CIMQualifierType getQualifierType(CIMObjectPath name)
          Get a CIMQualifierType.
 void initialize(CIMObjectPath name, javax.security.auth.Subject subject, java.util.Locale[] locales)
          Initialize the client connection.
 java.lang.Object invokeMethod(CIMObjectPath name, java.lang.String methodName, CIMArgument[] inArgs, CIMArgument[] outArgs)
          Executes the specified method on the specified object.
 void modifyClass(CIMClass cc)
          Modify the CIMClass.
 void modifyInstance(CIMInstance ci, java.lang.String[] propertyList)
          Modify some or all of the properties of the specified CIMInstance.
 CloseableIterator referenceNames(CIMObjectPath objectName, java.lang.String resultClass, java.lang.String role)
          Enumerates the CIMObjectPaths of Association Objects that are refer to a particular source CIM Object.
 CloseableIterator references(CIMObjectPath objectName, java.lang.String resultClass, java.lang.String role, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Enumerates the Association Objects that refer to a specified source CIM Object.
 void setLocales(java.util.Locale[] pLocales)
          Change the locales that were provided during initialization.
 void setQualifierType(CIMQualifierType pQualifierType)
          Add a CIMQualifierType to the specified namespace if it does not already exist.
 void setTimeout(int timeout)
          Set the timeout for operations.
 

Method Detail

associatorNames

public CloseableIterator associatorNames(CIMObjectPath objectName,
                                         java.lang.String assocClass,
                                         java.lang.String resultClass,
                                         java.lang.String role,
                                         java.lang.String resultRole)
                                  throws WBEMException
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:
objectName - 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)
assocClass - 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.
resultClass - 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.
role - 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.
resultRole - 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 objectName,
                                     java.lang.String assocClass,
                                     java.lang.String resultClass,
                                     java.lang.String role,
                                     java.lang.String resultRole,
                                     boolean includeQualifiers,
                                     boolean includeClassOrigin,
                                     java.lang.String[] propertyList)
                              throws WBEMException
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:
objectName - 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)
assocClass - 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.
resultClass - 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.
role - 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.
resultRole - 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.
includeQualifiers - 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.
includeClassOrigin - The class origin attribute is the name of the class that first defined the property or method. If true, the class origin attribute will be present for each property and method on all Objects returned. If false, the class origin will not be present.
propertyList - 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 cc)
                 throws WBEMException
Create a CIM class The namespace from the CIMClass.getObjectPath() will be used.

Parameters:
cc - 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 ci)
                             throws WBEMException
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:
ci - 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 path)
                 throws WBEMException
Deletes the CIM class for the object specified by the CIM object path.

Parameters:
path - 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 path)
                    throws WBEMException
Delete the CIM instance specified by the CIM object path. The following code sample uses instance name enumeration to retrieve the names of all instances of the specified class, prints the name of each instance, then deletes the instance.

Parameters:
path - 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 path)
                         throws WBEMException
Delete a CIM Qualfier Type

Parameters:
path - 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 path,
                                          boolean deep,
                                          boolean localOnly,
                                          boolean includeQualifiers,
                                          boolean includeClassOrigin)
                                   throws WBEMException
Enumerate CIM Classes.

Parameters:
path - 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.
deep - 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.
localOnly - 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.
includeQualifiers - If true, all Qualifiers for each Class and its elements (properties, methods, references). If false, no Qualifiers are present in the classes returned
includeClassOrigin - The class origin attribute is the name of the class that first defined the property or method. If true, the class Origin attribute will be present for each property and method on all returned CIMClasses. If false, the class origin will not be present.
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 path,
                                             boolean deep)
                                      throws WBEMException
Enumerate the names of CIM Classes.

Parameters:
path - 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.
deep - 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 path)
                                         throws WBEMException
Enumerate the names of the instances for a specified class. The names of all subclass instances are returned.

Parameters:
path - 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 path,
                                            boolean deep,
                                            boolean localOnly,
                                            boolean includeClassOrigin,
                                            java.lang.String[] propertyList)
                                     throws WBEMException
Enumerate the instances of a class. The instances of all subclasses are also returned.

Parameters:
path - 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.
deep - If true, this specifies that, for each returned Instance of the Class, all properties of the Instance must be present (subject to constraints imposed by the other parameters), including any which were added by subclassing the specified Class. If false, each returned Instance includes only properties defined for the specified Class in path.
localOnly - If true, only elements values that were instantiated in the instance is returned.
includeClassOrigin - The class origin attribute is the name of the class that first defined the property. If true, the class origin attribute will be present for each property on all returned CIMInstances. If false, the class origin will not be present.
propertyList - 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 path)
                                          throws WBEMException
Enumerates the CIM Qualfiier Types for a specific namespace

Parameters:
path - 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 path,
                                   java.lang.String query,
                                   java.lang.String queryLanguage)
                            throws WBEMException
ExecQuery will execute a query to retrieve objects.

Parameters:
path - CIMObjectPath identifying the class to query. Only the namespace and class name components are used. All other information (e.g. Keys) is ignored.
query - A string containing the text of the query.
queryLanguage - A string that identifies the query language to use to parse the query string specified.
Returns:
A CloseableIterator of CIMInstances.
Throws:
java.lang.IllegalArgumentException - If the path is null or empty.
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 name,
                         boolean localOnly,
                         boolean includeQualifiers,
                         boolean includeClassOrigin,
                         java.lang.String[] propertyList)
                  throws WBEMException
Returns the CIMClass for the specified CIMObjectPath.

Parameters:
name - 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.
localOnly - 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.
includeQualifiers - 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.
includeClassOrigin - The class origin attribute is the name of the class that first defined the property or method. If true, the class Origin attribute will be present for each property and method on all returned CIMClasses. If false, the class origin will not be present.
propertyList - 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 name,
                               boolean localOnly,
                               boolean includeClassOrigin,
                               java.lang.String[] propertyList)
                        throws WBEMException
Get a CIMInstance.

Parameters:
name - The object path of the instance to be returned. The Keys in this CIMObjectPath must be populated.
localOnly - 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.
includeClassOrigin - The class origin attribute is the name of the class that first defined the property or method. If true, the class origin attribute will be present for each property of the CIMInstance. If false, the class origin will not be present.
propertyList - 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)
 

getQualifierType

public CIMQualifierType getQualifierType(CIMObjectPath name)
                                  throws WBEMException
Get a CIMQualifierType.

Parameters:
name - 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 name,
                       javax.security.auth.Subject subject,
                       java.util.Locale[] locales)
                throws WBEMException
Initialize the client connection. This must be called before any operations.

Parameters:
name - The protocol and host to use (e.g. http://192.168.1.128/). Any other fields will be ignored.
subject - The principal/credential pairs for this connection.
locales - An array of locales in order of priority of preference.
Throws:
java.lang.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 java.lang.Object invokeMethod(CIMObjectPath name,
                                     java.lang.String methodName,
                                     CIMArgument[] inArgs,
                                     CIMArgument[] outArgs)
                              throws WBEMException
Executes the specified method on the specified object.

Parameters:
name - CIM object path of the object whose method must be invoked. It must include all of the keys.
methodName - the name of the method to be invoked.
inArgs - the CIMArgument array of method input parameters.
outArgs - 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 <b>DOES NOT</b> support <b>ANY</b>
         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 cc)
                 throws WBEMException
Modify the CIMClass.

Parameters:
cc - 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,
                           java.lang.String[] propertyList)
                    throws WBEMException
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 objectName,
                                        java.lang.String resultClass,
                                        java.lang.String role)
                                 throws WBEMException
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:
objectName - 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)
resultClass - 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.
role - 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 rfeferencing 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 objectName,
                                    java.lang.String resultClass,
                                    java.lang.String role,
                                    boolean includeQualifiers,
                                    boolean includeClassOrigin,
                                    java.lang.String[] propertyList)
                             throws WBEMException
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:
objectName - 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)
resultClass - 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.
role - 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.
includeQualifiers - 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.
includeClassOrigin - The class origin attribute is the name of the class that first defined the property or method. If true, the class Origin attribute will be present for each property and method on all Objects returned. If false, the class origin will not be present.
propertyList - 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(java.util.Locale[] pLocales)
Change the locales that were provided during initialization.

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

setQualifierType

public void setQualifierType(CIMQualifierType pQualifierType)
                      throws WBEMException
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)
 

setTimeout

public void setTimeout(int timeout)
Set the timeout for operations. A timeout of zero is interpreted as an infinite timeout. The use of this timeout may have different implications for different protocols. Please refer to the documentation for the specific protocol implementation for details.

Parameters:
timeout - - the specified timeout, in milliseconds.
Throws:
java.lang.UnsupportedOperationException - Some implementations/protocols may not use a network timeout and not support this operation.


Java™ WBEM (JSR48) 1.0.0 API