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
- 权限名称。
必须是“监视器”或“控制”。
NullPointerException
- 如果
name
是
null
。
IllegalArgumentException
- 如果
name
为空或无效。
public ManagementPermission(String name, String actions) throws IllegalArgumentException
name
- 权限名称。
必须是“监视器”或“控制”。
actions
- 必须为null或空字符串。
NullPointerException
- 如果
name
是
null
。
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.