|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.wbem.client.CIMClient
Constructs a CIM client on the local host (default) or the specified host. This class connect to the WBEM Server for this client session to perform WBEM operations, such as, adding, modifying, or deleting a CIM class, CIM instance, and CIM qualifier type in a namespace.
A WBEM client application connects to a WBEM Server to establish an initial connection when it needs to perform WBEM operations.
Field Summary | |
static java.lang.String |
CIM_XML
Constant identifying the CIM operations over XML protocol. |
Constructor Summary | |
CIMClient(CIMNameSpace name,
java.security.Principal principal,
java.lang.Object credential)
Creates a new client connection to the WBEM Server on the host and namespace specified in the namespace object, using the specified principal and credential to authenticate the client user identity to the WBEM Server. |
|
CIMClient(CIMNameSpace name,
javax.security.auth.Subject subject)
Creates a new client connection to the WBEM Server on the host and namespace specified in the namespace object, using the specified principal and credential to authenticate the client user identity to the WBEM Server. |
|
CIMClient(CIMNameSpace name,
javax.security.auth.Subject subject,
java.util.Locale[] locales)
Creates a new client connection to the WBEM Server on the host and namespace specified in the namespace object, using the specified principal and credential to authenticate the client user identity to the WBEM Server. |
Method Summary | |
void |
addCIMListener(CIMListener l)
Adds the specified CIMListener to receive Indications from the CIM Server. |
void |
addCIMListener(CIMListener l,
int p)
Adds the specified CIMListener to receive Indications from the CIM Server. |
java.util.Enumeration |
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. |
java.util.Enumeration |
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)
Enumerate CIM Objects that are associated to a specified source CIM Object. |
void |
close()
Closes the client connection to the WBEM Server. |
void |
createClass(CIMObjectPath name,
CIMClass cc)
Adds the CIM class to the specified namespace. |
CIMObjectPath |
createInstance(CIMObjectPath name,
CIMInstance ci)
Adds the specified CIM Instance to the specified namespace. |
void |
deleteClass(CIMObjectPath path)
Deletes the CIM class for the object specified by the CIM object path. |
void |
deleteInstance(CIMObjectPath path)
Deletes the CIM instance specified by the CIM object path. |
void |
deleteQualifierType(CIMObjectPath path)
Deletes the CIM qualfier type in the namespace specified by the CIM object path. |
java.util.Enumeration |
enumerateClasses(CIMObjectPath path,
boolean deep,
boolean localOnly,
boolean includeQualifiers,
boolean includeClassOrigin)
Enumerates the class specified in the path. |
java.util.Enumeration |
enumerateClassNames(CIMObjectPath path,
boolean deep)
Enumerates the class specified in the path. |
java.util.Enumeration |
enumerateInstanceNames(CIMObjectPath path)
Returns the object paths of all instances of the class specified. |
java.util.Enumeration |
enumerateInstances(CIMObjectPath path,
boolean deep,
boolean localOnly,
boolean includeQualifiers,
boolean includeClassOrigin,
java.lang.String[] propertyList)
Returns an enumeration of all instances of the class specified by the CIMObjectPath argument. |
java.util.Enumeration |
enumQualifierTypes(CIMObjectPath path)
Enumerates the qualifiers defined in the specified namespace. |
java.util.Enumeration |
execQuery(CIMObjectPath path,
java.lang.String query,
java.lang.String ql)
Executes 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 |
getIndicationListener(CIMListener cl)
This method returns an Instance of the subclass of CIM_ListenerDestination defined for the client's protocol. |
CIMInstance |
getInstance(CIMObjectPath name,
boolean localOnly,
boolean includeQualifiers,
boolean includeClassOrigin,
java.lang.String[] propertyList)
Returns the CIMInstance for the specified CIMObjectPath. |
CIMQualifierType |
getQualifierType(CIMObjectPath name)
Gets the CIMQualifierType specified. |
CIMValue |
invokeMethod(CIMObjectPath name,
java.lang.String methodName,
CIMArgument[] inArgs,
CIMArgument[] outArgs)
Executes the specified method on the specified object. |
BatchResult |
performBatchOperations(BatchHandle bc)
Executes the batch operations contained in the specified BatchHandle object. |
java.util.Enumeration |
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. |
java.util.Enumeration |
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 |
removeCIMListener(CIMListener l)
Removes the specified CIMListener that is receiving Indications from the CIM Server. |
void |
setClass(CIMObjectPath name,
CIMClass cc)
Modifies the CIMClass in the specified namespace. |
void |
setInstance(CIMObjectPath name,
CIMInstance ci,
boolean includeQualifiers,
java.lang.String[] propertyList)
Modifies some or all of the properties of the specified CIMInstance in the specified namespace. |
void |
setQualifierType(CIMObjectPath name,
CIMQualifierType qt)
Adds the specified CIMQualifierType to the specified namespace if it does not already exist. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.wbem.client.CIMOMHandle |
createQualifierType, getIndicationHandler, setInstance |
Field Detail |
public static final java.lang.String CIM_XML
Constructor Detail |
public CIMClient(CIMNameSpace name, java.security.Principal principal, java.lang.Object credential) throws CIMException
name
- The namespace in which operations will be performed. This
can be a URL that includes the protocol scheme and optional
port information. See the DMTF WBEM URI Specification for the
format. Example: https://192.168.0.4:5989/interop. This will
use the https protocol to connect on port 5989principal
- The client user principal identity.credential
- The client user credential for authentication.
CIMException
- If unsuccessful, one of the following status
codes must be returned. The ORDERED list
is:
CIM_ERR_ACCESS_DENIED, NO_SUCH_PRINCIPAL (user account does not exist), INVALID_CREDENTIAL (invalid password), CIM_ERR_NOT_SUPPORTED, CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters), CIM_ERR_FAILED (some other unspecified error occurred)
public CIMClient(CIMNameSpace name, javax.security.auth.Subject subject) throws CIMException
name
- The namespace in which operations will be performedsubject
- The principal/credential pairs for this connection
CIMException
- If unsuccessful, one of the following status
codes must be returned. The ORDERED list
is:
CIM_ERR_ACCESS_DENIED, NO_SUCH_PRINCIPAL (user account does not exist), INVALID_CREDENTIAL (invalid password), CIM_ERR_NOT_SUPPORTED, CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters), CIM_ERR_FAILED (some other unspecified error occurred)
public CIMClient(CIMNameSpace name, javax.security.auth.Subject subject, java.util.Locale[] locales) throws CIMException
name
- The namespace in which operations will be performedsubject
- The principal/credential pairs for this connectionlocales
- An array of locales in priority of preference
CIMException
- If unsuccessful, one of the following status
codes must be returned. The ORDERED list
is:
CIM_ERR_ACCESS_DENIED, NO_SUCH_PRINCIPAL (user account does not exist), INVALID_CREDENTIAL (invalid password), CIM_ERR_NOT_SUPPORTED, CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters), CIM_ERR_FAILED (some other unspecified error occurred)
Method Detail |
public void addCIMListener(CIMListener l) throws CIMException
close()
must be called. If close()
is not
called, listening for Indications may still continue. The calling
client program will not be able to exit without calling
System.exit()
. Any duplicate listeners are ignored.
addCIMListener
in interface CIMOMHandle
l
- The CIMListener to add to receive Indications from the
CIM Server.
CIMException
- If unsuccessful, one of the following status
codes must be returned. The ORDERED list
is:
CIM_ERR_ACCESS_DENIED, CIM_ERR_NOT_SUPPORTED (if CIMOM does not support events), CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters), CIM_ERR_FAILED (some other unspecified error occurred)
close()
public void addCIMListener(CIMListener l, int p) throws CIMException
close()
must be called. If close()
is not
called, listening for Indications may still continue. The calling
client program will not be able to exit without calling
System.exit()
. Any duplicate listeners are ignored.
l
- The CIMListener to add to receive Indications from the
CIM Server.p
- The port to receive Indications on
CIMException
- If unsuccessful, one of the following status
codes must be returned. The ORDERED list
is:
CIM_ERR_ACCESS_DENIED, CIM_ERR_NOT_SUPPORTED (if CIMOM does not support events), CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters), CIM_ERR_FAILED (some other unspecified error occurred)
close()
public java.util.Enumeration associatorNames(CIMObjectPath objectName, java.lang.String assocClass, java.lang.String resultClass, java.lang.String role, java.lang.String resultRole) throws CIMException
associatorNames
in interface CIMOMHandle
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.
CIMException
- 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)
public java.util.Enumeration 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 CIMException
associators
in interface CIMOMHandle
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
- 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.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.
CIMException
- 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)
public void close() throws CIMException
close
in interface CIMOMHandle
CIMException
- 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_FAILED (some other unspecified error occurred)
public void createClass(CIMObjectPath name, CIMClass cc) throws CIMException
createClass
in interface CIMOMHandle
name
- CIMObjectPath that identifies the CIMClass to be addedcc
- CIMClass to be added
CIMException
- 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)
public CIMObjectPath createInstance(CIMObjectPath name, CIMInstance ci) throws CIMException
createInstance
in interface CIMOMHandle
name
- CIM object path that identifies the CIM instance to
be added. Only the namespace component is used. All
other information (e.g. keys) is ignored.ci
- CIM instance to be created. Its keys and properties may
be initialized by either the client or server.
CIMException
- 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)
public void deleteClass(CIMObjectPath path) throws CIMException
deleteClass
in interface CIMOMHandle
path
- The CIMObjectPath identifying the class to delete
CIMException
- 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)
public void deleteInstance(CIMObjectPath path) throws CIMException
CIMObjectPath cop = new CIMObjectPath("CIM_FooClass");
Enumeration e = cimomHandle.enumerateInstanceNames(cop);
while(e.hasMoreElements()) {
CIMObjectPath op = (CIMObjectPath)e.nextElement();
System.out.println(op.toString());
cimomHandle.deleteInstance(op);
}
deleteInstance
in interface CIMOMHandle
path
- The object path of the instance to be deleted. It must
include all of the keys.
CIMException
- 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)
public void deleteQualifierType(CIMObjectPath path) throws CIMException
deleteQualifierType
in interface CIMOMHandle
path
- the CIMObjectPath identifying the CIM qualifier
to delete
CIMException
- 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)
public java.util.Enumeration enumerateClasses(CIMObjectPath path, boolean deep, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin) throws CIMException
enumerateClasses
in interface CIMOMHandle
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, 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
returnedincludeClassOrigin
- 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.
CIMException
- 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(CIMObjectPath)
,
enumerateClasses(CIMObjectPath)
public java.util.Enumeration enumerateClassNames(CIMObjectPath path, boolean deep) throws CIMException
enumerateClassNames
in interface CIMOMHandle
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.
CIMException
- 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)
public java.util.Enumeration enumerateInstanceNames(CIMObjectPath path) throws CIMException
enumerateInstanceNames
in interface CIMOMHandle
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.
CIMException
- 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)
public java.util.Enumeration enumerateInstances(CIMObjectPath path, boolean deep, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList) throws CIMException
enumerateInstances
in interface CIMOMHandle
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, 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.localOnly
- If true, only elements (properties, methods,
references) overridden or defined in the class
are included in the instances returned.includeQualifiers
- If true, all Qualifiers for each instance
are included in the instances returned. If
false, no Qualifier information is contained
in the Instances returned.includeClassOrigin
- 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.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.
CIMException
- 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)
public java.util.Enumeration enumQualifierTypes(CIMObjectPath path) throws CIMException
enumQualifierTypes
in interface CIMOMHandle
path
- The CIMObjectPath identifying the namespace whose
qualifier definitions are to be enumerated.
CIMException
- 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)
public java.util.Enumeration execQuery(CIMObjectPath path, java.lang.String query, java.lang.String ql) throws CIMException
NOTE: The CIMInstances returned by this method contain all Qualifier information, all local and inherited elements (properties, methods, references), and CLASSORIGIN information.
execQuery
in interface CIMOMHandle
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. The value
specified cannot be null.ql
- A string that identifies the query language to use to
parse the query string specified. (e.g. "WQL") WQL
Level 1 is currently the only supported query language.
CIMException
- 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)
public CIMClass getClass(CIMObjectPath name, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList) throws CIMException
getClass
in interface CIMOMHandle
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
- If true, the CLASSORIGIN attribute will be
present on all appropriate elements in the
CIMClass returned. If false, no CLASSORIGIN
attributes are present in the CIMClass
returned. CLASSORIGIN is attached to an element
(properties, methods, references) to indicate
the class in which it was first defined.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.
CIMException
- 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)
enumerateClasses(CIMObjectPath)
,
enumerateClassNames(CIMObjectPath)
public CIMInstance getIndicationListener(CIMListener cl) throws CIMException
CIM_ListenerDestination
defined for the client's protocol.
Thus, for HTTP, an Instance of CIM_ListenerDestinationCIMXML
is returned. For RMI, an Instance of the subclass of
CIM_ListenerDestination
defined for RMI is returned. The
returned Instance of the subclass of CIM_ListenerDestination
should then be passed to createInstance()
to establish a
handler in the WBEM Server. Using this method, a client can
create a protocol independent implementation for creating a
CIM_ListenerDestination
subclass Instance.
cl
- CIMListener for which a
CIM_ListenerDestination
subclass is being
returned. If null, the Instance of the
CIM_ListenerDestination
subclass returned
can be used to deliver Indications to all listeners that
have been added by the addCIMListener()
call. If non-null, the returned handler can be
used to deliver Indications to a specific listener.
NOTE: Unique listeners should return unique
values in their hashCode methods in order to be
differentiated. Also note that some implementations
may have partial support. For example, they may set
cl
to null or non-null.
CIM_ListenerDestination
subclass
defined for the client's protocol.
CIMException
- If unsuccessful, one of the following status
codes must be returned. The ORDERED list
is:
CIM_ERR_ACCESS_DENIED, CIM_ERR_NOT_SUPPORTED (if CIMOM does not support events), CIM_ERR_FAILED (some other unspecified error occurred)
public CIMInstance getInstance(CIMObjectPath name, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList) throws CIMException
getInstance
in interface CIMOMHandle
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.includeQualifiers
- If true, all Qualifiers for the instance and
its elements are included in the CIMInstance
returned. If false, no Qualifier information
is contained in the CIMInstance returned.includeClassOrigin
- 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.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.
CIMException
- 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)
enumerateInstances(CIMObjectPath)
,
enumerateInstanceNames(CIMObjectPath)
public CIMQualifierType getQualifierType(CIMObjectPath name) throws CIMException
getQualifierType
in interface CIMOMHandle
name
- CIMObjectPath that identifies the CIMQualifierType
to return.
CIMException
- 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)
public CIMValue invokeMethod(CIMObjectPath name, java.lang.String methodName, CIMArgument[] inArgs, CIMArgument[] outArgs) throws CIMException
invokeMethod
in interface CIMOMHandle
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.
CIMException
- 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)
public BatchResult performBatchOperations(BatchHandle bc) throws CIMException
Example:
The following code example demonstrates how to enumerate instances of Classes CIM_Foo and CIM_Bar as batch operations.
BatchCIMClient batchClient = new BatchCIMClient();
CIMObjectPath fooCOP = new CIMObjectPath("CIM_Foo");
CIMObjectPath barCOP = new CIMObjectPath("CIM_Bar");
int enumFooID = batchClient.enumerateInstances(fooCOP,
false, true, false, false, null);
int enumBarID = batchClient.enumerateInstances(barCOP,
false, true, false, false, null);
// perform the Batch operations on an existing CIMOMHandle
BatchResult batchRes = cimomHandle.performBatchOperations(
batchClient);
performBatchOperations
in interface CIMOMHandle
bc
- The BatchHandle that contains the list of operations
to be performed.
CIMException
- If batch mode is turned off or the list of
CIM operations is null.public java.util.Enumeration referenceNames(CIMObjectPath objectName, java.lang.String resultClass, java.lang.String role) throws CIMException
referenceNames
in interface CIMOMHandle
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.
CIMException
- 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)
public java.util.Enumeration references(CIMObjectPath objectName, java.lang.String resultClass, java.lang.String role, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList) throws CIMException
references
in interface CIMOMHandle
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
- 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.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.
CIMException
- 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)
public void removeCIMListener(CIMListener l) throws CIMException
removeCIMListener
in interface CIMOMHandle
l
- The CIMListener to remove from the CIM Server.
CIMException
- If unsuccessful, one of the following status
codes must be returned. The ORDERED list
is:
CIM_ERR_ACCESS_DENIED, CIM_ERR_NOT_SUPPORTED (if CIMOM does not support events), CIM_ERR_FAILED (some other unspecified error occurred)
public void setClass(CIMObjectPath name, CIMClass cc) throws CIMException
setClass
in interface CIMOMHandle
name
- CIMObjectPath that identifies the CIM class to be
modifiedcc
- CIMClass to be modified
CIMException
- 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)
public void setInstance(CIMObjectPath name, CIMInstance ci, boolean includeQualifiers, java.lang.String[] propertyList) throws CIMException
setInstance
in interface CIMOMHandle
name
- CIMObjectPath that identifies the namespace in which
the specified CIMInstance should be modified. All other
information (e.g. Keys) is ignored.ci
- CIMInstance to be modified. Its properties may be
initialized by either the client or server.includeQualifiers
- This argument is ignored. Qualifiers cannot be
modified on a per-Instance basis. It exists for
backward compatibility only.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.
CIMException
- 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)
public void setQualifierType(CIMObjectPath name, CIMQualifierType qt) throws CIMException
setQualifierType
in interface CIMOMHandle
name
- CIM object path that identifies the CIM qualifier typeqt
- the CIM qualifier type to be added
CIMException
- 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |