java.lang.management

Class ManagementPermission

public final class ManagementPermission extends BasicPermission

Represents the permission to view or modify the data which forms part of the system management interfaces. Calls to methods of the system management beans, provided by the {@link ManagementFactory}, may perform checks against the current {@link java.lang.SecurityManager} (if any) before allowing the operation to proceed. Instances of this object are supplied to the {@link java.lang.SecurityManager} in order to perform these checks. It is not normal for instances of this class to be created outside the use of the {@link java.lang.SecurityManager}.

This object can represent two types of management permission:

Since: 1.5

Constructor Summary
ManagementPermission(String name)
Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control".
ManagementPermission(String name, String actions)
Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control".

Constructor Detail

ManagementPermission

public ManagementPermission(String name)
Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control".

Parameters: name the name of the permission this instance should represent; either "monitor" or "control".

Throws: IllegalArgumentException if the name is not either "monitor" or "control".

ManagementPermission

public ManagementPermission(String name, String actions)
Constructs a new ManagementPermission for one of the two permission targets, "monitor" and "control". Actions are not supported, so this value should be either null or the empty string.

Parameters: name the name of the permission this instance should represent; either "monitor" or "control". actions either null or the empty string.

Throws: IllegalArgumentException if the name is not either "monitor" or "control", or a value for actions is specified.