- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- jdk.jfr.FlightRecorderPermission
-
- 实现的所有接口
-
Serializable
,Guard
public final class FlightRecorderPermission extends BasicPermission
控制对Flight Recorder的访问权限。下表概述了权限允许的内容以及授予代码权限的风险。
Table shows permission target name, what the permission allows, and associated risks Permission Target Name What the Permission Allows Risks of Allowing this PermissionaccessFlightRecorder
Ability to create a Flight Recorder instance, register callbacks to monitor the Flight Recorder life cycle, and control an existing instance of Flight Recorder, which can record and dump runtime information, such as stack traces, class names, and data in user defined events. A malicious user may be able to extract sensitive information that is stored in events and interrupt Flight Recorder by installing listeners or hooks that never finish.registerEvent
Ability to register events, write data to the Flight Recorder buffers, and execute code in a callback function for periodic events. A malicious user may be able to write sensitive information to Flight Recorder buffers.通常,程序员不直接创建
FlightRecorderPermission
对象。 而是由安全策略代码创建对象,该安全策略代码基于读取安全策略文件。- 从以下版本开始:
- 9
- 另请参见:
-
BasicPermission
,Permission
,Permissions
,PermissionCollection
,SecurityManager
, Serialized Form
-
-
构造方法摘要
构造方法 构造器 描述 FlightRecorderPermission(String name)
构造具有指定名称的FlightRecorderPermission
。
-
方法摘要
-
声明方法的类 java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
-
声明方法的类 java.security.Permission
checkGuard, getName, toString
-
-
-
-
构造方法详细信息
-
FlightRecorderPermission
public FlightRecorderPermission(String name)
构造具有指定名称的FlightRecorderPermission
。- 参数
-
name
- 权限名称,必须是"accessFlightRecorder"
或"registerEvent"
,而不是null
- 异常
-
IllegalArgumentException
- 如果name
为空或无效
-
-