模块  jdk.jfr
软件包  jdk.jfr

Class FlightRecorderPermission

  • 实现的所有接口
    SerializableGuard

    public final class FlightRecorderPermissionextends 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 Permission accessFlightRecorder 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
    另请参见:
    BasicPermissionPermissionPermissionsPermissionCollectionSecurityManagerSerialized Form
    • 构造方法详细信息

      • FlightRecorderPermission

        public FlightRecorderPermission​(String name)
        构造具有指定名称的 FlightRecorderPermission
        参数
        name - 权限名称,必须是 "accessFlightRecorder""registerEvent" ,而不是 null
        异常
        IllegalArgumentException - 如果 name为空或无效