|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcn.chenlichao.wmi4j.AbstractSecurityScriptingObject
cn.chenlichao.wmi4j.SWbemServices
public class SWbemServices
You can use the methods of an SWbemServices object to perform operations against a namespace on either a local host or a remote host. SWbemServices object can be initialized by call SWbemLocator.connectServer() method only.
Created by chenlichao on 14-7-17.
| 方法摘要 | |
|---|---|
SWbemObjectSet |
associatorsOf(String objectPath)
Use default parameters for method associatorsOf(String, String, String, String, String, Boolean, Boolean, String, String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.AssociatorsFlag...) |
SWbemObjectSet |
associatorsOf(String objectPath,
String assocClass,
String resultClass,
String resultRole,
String role,
Boolean classesOnly,
Boolean schemaOnly,
String requiredAssocQualifier,
String requiredQualifier,
SWbemNamedValueSet objwbemNamedValueSet,
Flags.AssociatorsFlag... flags)
Returns a collection of objects (classes or instances) called endpoints that are associated with a specified object. |
void |
delete(String objectPath)
Use default parameters for method delete(String, Integer, SWbemNamedValueSet) |
void |
delete(String objectPath,
Integer flags,
SWbemNamedValueSet objWbemNamedValueSet)
deletes the class or instance that is specified in the object path. |
SWbemObject |
execMethod(String objectPath,
String methodName)
Use default parameters for method execMethod(String, String, SWbemObject, Integer, SWbemNamedValueSet) |
SWbemObject |
execMethod(String objectPath,
String methodName,
SWbemObject inParameters)
Use default parameters for method execMethod(String, String, SWbemObject, Integer, SWbemNamedValueSet) |
SWbemObject |
execMethod(String objectPath,
String methodName,
SWbemObject inParameters,
Integer flags,
SWbemNamedValueSet objWbemNamedValueSet)
Executes a method that is exported by a method provider. |
SWbemEventSource |
execNotificationQuery(String queryString)
Use default parameters for execNotificationQuery(String, String, Integer, SWbemNamedValueSet) |
SWbemEventSource |
execNotificationQuery(String queryString,
String queryLanguage,
Integer flags,
SWbemNamedValueSet objWbemNamedValueSet)
Executes a query to receive events. |
SWbemObjectSet |
execQuery(String queryString)
Use default parameters for execQuery method execQuery(String, String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.ExecQueryFlag...) |
SWbemObjectSet |
execQuery(String queryString,
String queryLanguage,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.ExecQueryFlag... flags)
Executes a query to retrieve objects. |
SWbemObject |
get(String objectPath)
Use default parameters for get method get(String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.GetFlag...) |
SWbemObject |
get(String objectPath,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.GetFlag... flags)
Retrieves an object, that is either a class definition or an instance, based on the object path. |
SWbemObjectSet |
instancesOf(String className)
Use default parameters for method instancesOf(String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.InstancesFlag...) |
SWbemObjectSet |
instancesOf(String className,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.InstancesFlag... flags)
Creates an enumerator that returns the instances of a specified class according to the user-specified selection criteria. |
SWbemObjectSet |
referencesTo(String objectPath)
Use default parameters for method referencesTo(String, String, String, Boolean, Boolean, String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.ReferenceFlag...) |
SWbemObjectSet |
referencesTo(String objectPath,
String resultClass,
String role,
Boolean classesOnly,
Boolean schemaOnly,
String requiredQualifier,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.ReferenceFlag... flags)
Returns a collection of all association classes or instances that refer to a specific source class or instance. |
SWbemObjectSet |
subclassesOf(String superClass,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.SubclassesFlag... flags)
Returns an SWbemObjectSet object. |
| 从类 cn.chenlichao.wmi4j.AbstractSecurityScriptingObject 继承的方法 |
|---|
getSecurity |
| 从类 java.lang.Object 继承的方法 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 方法详细信息 |
|---|
public SWbemObjectSet associatorsOf(String objectPath,
String assocClass,
String resultClass,
String resultRole,
String role,
Boolean classesOnly,
Boolean schemaOnly,
String requiredAssocQualifier,
String requiredQualifier,
SWbemNamedValueSet objwbemNamedValueSet,
Flags.AssociatorsFlag... flags)
throws WMIException
objectPath - String that contains the object path of the source class or instance.assocClass - [Optional] String that contains an association class. If specified, this parameter indicates that
the returned endpoints must be associated with the source through the specified association class
or a class that is derived from this association class.resultClass - [Optional] String that contains a class name. If specified, this optional parameter indicates that
the returned endpoints must belong to or be derived from the class specified in this parameter.resultRole - [Optional] String that contains a property name.
If specified, this parameter indicates that the returned endpoints must play a particular
role in their association with the source object. The role is defined by the name of
a specified property (which must be a reference property) of an association.role - [Optional] String that contains a property name.
If specified, this parameter indicates that the returned endpoints must participate in an association
with the source object in which the source object plays a particular role. The role is defined by
the name of a specified property (which must be a reference property) of an association.classesOnly - [Optional] Boolean value that indicates whether a list of class names should be returned rather than
actual instances of the classes. These are the classes to which the endpoint instances belong.
The default value for this parameter is FALSE.schemaOnly - [Optional] Boolean value that indicates whether the query applies to the schema rather than the data.
The default value for this parameter is FALSE. It can only be set to TRUE if the strObjectPath
parameter specifies the object path of a class. When set to TRUE, the set of returned
endpoints represent classes that are suitably associated with the source class in schema.requiredAssocQualifier - [Optional] String that contains a qualifier name.
If specified, this parameter indicates that the returned endpoints must be
associated with the source object through an association class that includes the
specified qualifier.requiredQualifier - [Optional] String that contains a qualifier name.
If specified, this parameter indicates that the returned endpoints must include
the specified qualifier.flags - [Optional] Integer that specifies additional flags to the operation.
The default value for this parameter is wbemFlagReturnImmediately,
which calls the method in the semisynchronous mode. This parameter can accept the following values.objwbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemObjectSet will be returned.
WMIException
public SWbemObjectSet associatorsOf(String objectPath)
throws WMIException
associatorsOf(String, String, String, String, String, Boolean, Boolean, String, String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.AssociatorsFlag...)
WMIException
public void delete(String objectPath,
Integer flags,
SWbemNamedValueSet objWbemNamedValueSet)
throws WMIException
objectPath - String that contains the object path to the object that you want to delete.flags - [Optional] Reserved. This value must be zero.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
WMIException
public void delete(String objectPath)
throws WMIException
delete(String, Integer, SWbemNamedValueSet)
WMIException
public SWbemObject execMethod(String objectPath,
String methodName,
SWbemObject inParameters,
Integer flags,
SWbemNamedValueSet objWbemNamedValueSet)
throws WMIException
objectPath - String that contains the object path of the object for which the method is executed.methodName - Name of the method for the object.inParameters - [Optional] An SWbemObject object that contains the input parameters for the method being executed.
By default, this parameter is undefined.flags - [Optional] Reserved. This value must be zero.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemObject object is returned.
The returned object contains the out parameters and return value for the method that is being executed.
WMIException
public SWbemObject execMethod(String objectPath,
String methodName,
SWbemObject inParameters)
throws WMIException
execMethod(String, String, SWbemObject, Integer, SWbemNamedValueSet)
WMIException
public SWbemObject execMethod(String objectPath,
String methodName)
throws WMIException
execMethod(String, String, SWbemObject, Integer, SWbemNamedValueSet)
WMIException
public SWbemEventSource execNotificationQuery(String queryString,
String queryLanguage,
Integer flags,
SWbemNamedValueSet objWbemNamedValueSet)
throws WMIException
queryString - String that contains the text of the event-related query. This parameter cannot be blank.
For more information on building WMI query strings,
see Querying with WQL
and the WQL reference.queryLanguage - [Optional] String that contains the query language to be used. If specified, this value must be "WQL".flags - [Optional] This is an integer that determines the behavior of the query. If specified, this value must be 48.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemEventSource object.
You can call the SWbemEventSource.nextEvent method to retrieve events as they arrive.
WMIException
public SWbemEventSource execNotificationQuery(String queryString)
throws WMIException
execNotificationQuery(String, String, Integer, SWbemNamedValueSet)
WMIException
public SWbemObjectSet execQuery(String queryString,
String queryLanguage,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.ExecQueryFlag... flags)
throws WMIException
SWbemObjectSet collection.
queryString - String that contains the text of the query. This parameter cannot be blank.
For more information on building WMI query strings,
see Querying with WQL
and the WQL reference.queryLanguage - [Optional] String that contains the query language to be used. If specified, this value must be "WQL".flags - [Optional] Integer that determines the behavior of the query and determines whether this call returns immediately.
The default value for this parameter is wbemFlagReturnImmediately.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemObjectSet object. This is an object collection that contains the result set of the query.
WMIException
public SWbemObjectSet execQuery(String queryString)
throws WMIException
execQuery(String, String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.ExecQueryFlag...)
WMIException
public SWbemObject get(String objectPath,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.GetFlag... flags)
throws WMIException
objectPath - [Optional] String that contains the object path of the object to retrieve.
If this value is empty, the empty object that is returned can become a new class.flags - [Optional] Integer that determines the behavior of the query.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemObject object that represents the requested object.
WMIException
public SWbemObject get(String objectPath)
throws WMIException
get(String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.GetFlag...)
WMIException
public SWbemObjectSet instancesOf(String className,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.InstancesFlag... flags)
throws WMIException
className - String that contains the name of the class for which instances are desired. This parameter cannot be blank.flags - This parameter determines how detailed the call enumerates and if this call returns immediately.
The default value for this parameter is wbemFlagReturnImmediately.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemObjectSet.
WMIException
public SWbemObjectSet instancesOf(String className)
throws WMIException
instancesOf(String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.InstancesFlag...)
WMIException
public SWbemObjectSet referencesTo(String objectPath,
String resultClass,
String role,
Boolean classesOnly,
Boolean schemaOnly,
String requiredQualifier,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.ReferenceFlag... flags)
throws WMIException
objectPath - String that contains the object path of the source for this method.resultClass - [Optional] String that contains a class name. If specified, this optional parameter indicates that
the returned endpoints must belong to or be derived from the class specified in this parameter.role - [Optional] String that contains a property name.
If specified, this parameter indicates that the returned endpoints must participate in an association
with the source object in which the source object plays a particular role. The role is defined by
the name of a specified property (which must be a reference property) of an association.classesOnly - [Optional] Boolean value that indicates whether a list of class names should be returned rather than
actual instances of the classes. These are the classes to which the endpoint instances belong.
The default value for this parameter is FALSE.schemaOnly - [Optional] Boolean value that indicates whether the query applies to the schema rather than the data.
The default value for this parameter is FALSE. It can only be set to TRUE if the strObjectPath
parameter specifies the object path of a class. When set to TRUE, the set of returned
endpoints represent classes that are suitably associated with the source class in schema.requiredQualifier - [Optional] String that contains a qualifier name.
If specified, this parameter indicates that the returned endpoints must include
the specified qualifier.flags - [Optional] Integer that specifies additional flags to the operation.
The default value for this parameter is wbemFlagReturnImmediately,
which calls the method in the semisynchronous mode. This parameter can accept the following values.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemObjectSet will be returned.
WMIException
public SWbemObjectSet referencesTo(String objectPath)
throws WMIException
referencesTo(String, String, String, Boolean, Boolean, String, SWbemNamedValueSet, cn.chenlichao.wmi4j.consts.Flags.ReferenceFlag...)
WMIException
public SWbemObjectSet subclassesOf(String superClass,
SWbemNamedValueSet objWbemNamedValueSet,
Flags.SubclassesFlag... flags)
throws WMIException
SWbemObjectSet object. This object is a collection of subclasses of a specified class.
Items in the returned collection can be obtained using standard collection methods.
This method only works for class objects.
The method is called in the semisynchronous mode.
superClass - [Optional] Specifies a parent class name.
Only subclasses of this class return in the enumerator.
If you leave this parameter blank, and if flags is wbemQueryFlagShallow,
only the top-level classes are returned (that is, classes that have no parent class).
If this parameter is blank and flags is wbemQueryFlagDeep,
all classes within the namespace are returned.flags - [Optional] Determines how detailed the call enumerates.
The default values for this parameter are wbemFlagReturnImmediately
and wbemQueryFlagDeep.objWbemNamedValueSet - [Optional] Typically, this is undefined.
Otherwise, this is an SWbemNamedValueSet object whose elements represent the context
information that can be used by the provider that is servicing the request.
A provider that supports or requires such information must document the recognized
value names, data type of the value, allowed values, and semantics.
SWbemObjectSet will be returned.
WMIException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||