cn.chenlichao.wmi4j
类 SWbemSecurity

java.lang.Object
  继承者 cn.chenlichao.wmi4j.SWbemSecurity

public class SWbemSecurity
extends Object

The SWbemSecurity object gets or sets security settings, such as privileges, COM impersonations, and authentication levels assigned to an object. The SWbemLocator, SWbemServices, SWbemObject, SWbemObjectSet, SWbemObjectPath, SWbemLastError, and SWbemEventSource objects have a security property, which is the SWbemSecurity object. When you retrieve an instance or view the WMI security log, you might need to set the properties of the SWbemSecurity object. Created by chenlichao on 14-7-23.


方法摘要
 WbemAuthenticationLevelEnum getAuthenticationLevel()
          Get the COM Authentication level that is assigned to this object.
 WbemImpersonationLevelEnum getImpersonationLevel()
          Get the COM impersonation level that is assigned to this object.
 SWbemPrivilegeSet getPrivileges()
          The privileges property is an SWbemPrivilegeSet object.
 void setAuthenticationLevel(WbemAuthenticationLevelEnum level)
          Set the COM Authentication level that is assigned to this object.
 void setImpersonationLevel(WbemImpersonationLevelEnum level)
          Set the COM impersonation level that is assigned to this object.
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

getAuthenticationLevel

public WbemAuthenticationLevelEnum getAuthenticationLevel()
                                                   throws WMIException
Get the COM Authentication level that is assigned to this object. This setting determines how you protect information sent from WMI.

返回:
The COM Authentication level that is assigned to this object.
抛出:
WMIException

setAuthenticationLevel

public void setAuthenticationLevel(WbemAuthenticationLevelEnum level)
                            throws WMIException
Set the COM Authentication level that is assigned to this object.

参数:
level - the COM Authentication level that is assigned to this object.
抛出:
WMIException

getImpersonationLevel

public WbemImpersonationLevelEnum getImpersonationLevel()
                                                 throws WMIException
Get the COM impersonation level that is assigned to this object. This setting determines if processes owned by Windows Management Instrumentation (WMI) can detect or use your security credentials when making calls to other processes.

返回:
the COM impersonation level that is assigned to this object.
抛出:
WMIException

setImpersonationLevel

public void setImpersonationLevel(WbemImpersonationLevelEnum level)
                           throws WMIException
Set the COM impersonation level that is assigned to this object.

参数:
level - the COM impersonation level that is assigned to this object.
抛出:
WMIException

getPrivileges

public SWbemPrivilegeSet getPrivileges()
                                throws WMIException
The privileges property is an SWbemPrivilegeSet object. This property is used to enable or disable specific Windows privileges. You may need to set one of these privileges to perform specific tasks using the Windows Management Instrumentation (WMI) API.

Remark

This setting allows you to grant or revoke privileges as part of a WMI moniker string. For the complete list of applicable values, see WbemPrivilegeEnum

You can change the privileges defined for the SWbemServices, SWbemObject, SWbemObjectSet, SWbemObjectPath, and SWbemLocator objects by adding SWbemPrivilege objects to the privileges property.

There are fundamental differences in how different versions of Windows handle changes to privileges. If you are developing an application that is only used on Windows platforms, you can set or revoke privileges at any time.

返回:
An SWbemPrivilegeSet object.
抛出:
WMIException


Copyright © 2014. All rights reserved.