public final class ManagementPermission extends BasicPermission
下表提供了一个对权限允许的简要说明,并讨论了授予代码权限的风险。
Permission Target Name | What the Permission Allows | Risks of Allowing this Permission |
---|---|---|
control | Ability to control the runtime characteristics of the Java virtual machine, for example, enabling and disabling the verbose output for the class loading or memory system, setting the threshold of a memory pool, and enabling and disabling the thread contention monitoring support. Some actions controlled by this permission can disclose information about the running application, like the -verbose:class flag. | This allows an attacker to control the runtime characteristics of the Java virtual machine and cause the system to misbehave. An attacker can also access some information related to the running application. |
monitor | Ability to retrieve runtime information about the Java virtual machine such as thread stack trace, a list of all loaded class names, and input arguments to the Java virtual machine. | This allows malicious code to monitor runtime information and uncover vulnerabilities. |
程序员通常不创造managementpermission对象直接。相反,他们是由基于读取安全策略文件的安全策略代码创建的。
BasicPermission
,
Permission
,
Permissions
,
PermissionCollection
,
SecurityManager
,
Serialized Form
Constructor and Description |
---|
ManagementPermission(String name)
构建了一个具有指定名称的managementpermission。
|
ManagementPermission(String name, String actions)
构建了一种新的managementpermission对象。
|
equals, getActions, hashCode, implies, newPermissionCollection
checkGuard, getName, toString
public ManagementPermission(String name)
name
权限名称。必须是“监视器”或“控制”。
null
name
NullPointerException
。
IllegalArgumentException
-如果
name
是空的或无效的。
public ManagementPermission(String name, String actions) throws IllegalArgumentException
name
权限名称。必须是“监视器”或“控制”。
actions
-必须是null或空字符串。
null
name
NullPointerException
。
IllegalArgumentException
-如果参数无效
name
是空的或。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.